CodeBeamOrg / CodeBeam.MudBlazor.Extensions

Useful third party extension components for MudBlazor, from the contributors.
https://mudextensions.codebeam.org/
MIT License
406 stars 65 forks source link

SelectExtended / ComboBox: Adding new items to the box from the search field #438

Open seyfeb opened 1 month ago

seyfeb commented 1 month ago

I may be missing something but is there a way to use the MudComboBox to dynamically add values that are not yet available for selection?

The use use would be a list of tags that is prefilled with existing tags but allows for adding text by typing, e.g., in the search box and hitting enter to confirm the new tag.

I can't see a way to get the keydown event in the search field and extract the search value to add it to the list of available items.

Edit: I found that on that for the MudSelectExtended component you can store a local copy of the search string by subscribing to the OnSearchStringChange event. However, I still do not see a possibility to, e.g., track the 'KeyUp' event in the search box to check if Enter was pressed with an unknown value.

seyfeb commented 1 month ago

For reference: I'm looking for something like this ComboBox https://vuetifyjs.com/en/components/combobox/#multiple-combobox where you can type some unknown value and on tab or enter the types value is used.

seyfeb commented 4 weeks ago

It might be also possible to use MudChipField but this is missing the autocompletion functionality.