Havit.Blazor icon indicating copy to clipboard operation
Havit.Blazor copied to clipboard

[HxAutosuggest] Tweaks to be able to use it as searchable select

Open Apskaita5 opened this issue 2 years ago • 5 comments

Could you add a searchable select component to your collection (e.g. https://github.com/Blazored/Typeahead)? It's the only missing component for CRM apps (e.g. for selecting a client in a form).

Apskaita5 avatar Apr 19 '22 13:04 Apskaita5

Hello @Apskaita5, please take a look at HxAutosuggest (https://havit.blazor.eu/components/HxAutosuggest). It is designed to cover those scenarios. Can you please add more information on what specific features are you missing?

hakenr avatar Apr 19 '22 14:04 hakenr

Blazored/Typeahead component allows for both selecting from a list and search. HxAutosuggest only allows search, not selection from a list. HxSelect allows selection from a list, not search.

Apskaita5 avatar Apr 20 '22 10:04 Apskaita5

If you set MinimumLength="0" and Delay="1" (this is something we want to change to allow 0) you should get a selection from list (see similar demo for HxInputTags https://havit.blazor.eu/components/HxInputTags#StaticSuggestions).

Is that what you need?

hakenr avatar Apr 20 '22 15:04 hakenr

That would be great except for two details:

  • [x] the dropdown doesn't have it's own scrollbar, which is a problem for long lists (just try it with your example, it has item collection big enough to demonstrate graphical result);
  • [ ] the dropdown does not appear on focus when a value is already selected, which could be misleading for an end user.

;)

Apskaita5 avatar Apr 21 '22 07:04 Apskaita5

@Apskaita5 Got it. There are some additional tweaks needed to be able to use HxAutosuggest as searchable select. This is valid usage scenario and we will make the adjustments needed. If you find any additional issues, please let us know.

cc @crdo @jirikanda

hakenr avatar Apr 21 '22 10:04 hakenr