You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
691 B
27 lines
691 B
2 years ago
|
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);
|
||
|
}
|
||
|
}
|
||
|
}
|