private List <TItem> _internalFilter(string search = "") { var query = from q in Options let text = GetTextFunc.Invoke(q) where text.IndexOf(search, 0, System.StringComparison.CurrentCultureIgnoreCase) >= 0 select q; return(query.ToList()); }
private async Task _itemSelected(string itemValue) { _isDropdownVisible = false; var selectedItem = _filteredOptions.FirstOrDefault(x => GetValueFunc(x) == itemValue); _value = selectedItem != null?GetTextFunc?.Invoke(selectedItem) : string.Empty; await ValueChanged.InvokeAsync(new ChangeEventArgs { Value = _value }); await OnInput.InvokeAsync(new ChangeEventArgs { Value = _value }); await InvokeAsync(StateHasChanged); }