MudSelect - custom search or select on multiple subsequent characters/keys #8646
Unanswered
jiri-panek
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, I need to implement
MudSelect
search/select on first TWO characters matching the selected element. Out of the box, MudSelect works just for only one character, no follow up, the other character is just treated as first character for another item.I had an idea about intercepting key press, adding some kind of timer to give user time to search for multiple subsequent characters pressed in this time frame to differentiate between multiple character search and new search with another character as the first character. But I wasn't able to find an event which makes the interception possible.
I've tried:
OnKeyDown
- is NOT called for alphabet characters, which I think is a bug. For me, this method got called only for control characters like ALT, Escape, etc.OnInternalInputChanged
- not called at allTextChanged
- this got called everytime, but I think it is too late to change the search logic, value on this event is not the single character pressed, but already whole text value of the selected item for the character pressedI tried to use
MudAutocomplete
. It has some different quirks which I didn't like, but I think it could be done, but ultimately it is not the component I would like to use, because unlikeMudSelect
it allows to write any value into the input field which I don't want the user to do, I just want to put in one of the provided possibilites and enable multichar search/select.Anybody has any tips how to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions