How to disable this FocusIn() ???
I spent a day trying to remove the focus from the input field and did not succeed
The proposed solutions do not work:
await Task.Yield();
await SfComboBox.FocusOutAsync();
or
await SfComboBox.FocusOutAsync();
await Task.Delay(1000);
or
await Task.Yield();
await SfComboBox.FocusOutAsync();
await Task.Delay(1000);
|
<SfComboBox @ref="@ComboBox1" TItem="Countries" TValue="string" Placeholder="e.g. Australia" @bind-Value="@ComboVal" DataSource="@Country">
<ComboBoxFieldSettings Value="Name"></ComboBoxFieldSettings>
<ComboBoxEvents TValue="string" TItem="Countries" Closed="@DeFocusComboBox" OnValueSelect="@DeFocusComboBox"></ComboBoxEvents>
</SfComboBox>
public async Task DeFocusComboBox()
{
Thread tread = new Thread(
async () =>
{
Thread.Sleep(15);
await ComboBox1.FocusOutAsync();
}
);
tread.Start();
await Task.CompletedTask;
} |