Hi.
How to read typed by user search text? I want to use it if not found, create new item in datasource.
Check LoadData event arguments.
thanks, I've found it there, but in this case i need to build from scratch filtered collections. when I only use LoadData event to get that text, dropdown isn't filtered, right?
It will be nice to get just to read only SearchText available - it exists but it's private.
There is no other option at the moment, feel free to submit pull request if you think there is a better approach!
I don't know how to create pull request,
can You check my proposal?
in DataBoundFormComponent<T>
class added:
/// <summary>
/// Gets the Search text typed by user
/// </summary>
public string SearchText => searchText;
then on DropDownBase<T>
class:
/// <summary>
/// Gets or sets the search text changed.
/// </summary>
/// <value>The search text changed.</value>
[Parameter]
public Action<string> SearchTextChanged { get; set; }
and finally in async Task DebounceFilter()
at the end add:
...
await JSRuntime.InvokeAsync<...
SearchTextChanged?.Invoke(SearchText);
}
what do You think? I've tested it and it works.
I need explanation how to add pull requests...
Thank You for docs, can You check if I did it correctly?