using Microsoft.JSInterop; namespace Biskilog_Accounting.Client.Elements { public partial class Headbar { protected override void OnInitialized() { m_searchService.ClearTextBox += ClearTextBox; base.OnInitialized(); } private void ClearTextBox() { ClearInputField("mainSearch"); } private async Task ClearInputField(string elementId) { await JSRuntime.InvokeVoidAsync("eval", $"document.getElementById('{elementId}').value = ''"); } private void SearchInput(string a_key) { m_searchService.PerformSearch(a_key); } } }