TW-Elements
TW-Elements copied to clipboard
Autocomplete Input
Hi all
This is a feature request I just wonder, if it would be possible to create an autocomplete-text-input with the already existing functionality.
What I miss in multiple component libraries: a autocomplete input textfield that is a mix of textinput and select. The idea behind is: a free-text input element, where user can enter everything he wants, but when typing, it should automatically suggest values that are already known. But it also shall accept a new unknown value.
On the one hand we can use select with search functionality - but this doesn't accept new values...
But what if the search-dropdown of the select-input could be added to a text-input that opens up when typing? maybe many code can be reused?
I know currently one library out there that offers such a functionality: tagify.js - when disabling "enforceWhitelist" and using this example: https://yaireo.github.io/tagify/#section-mode-select
nevertheless - since I use tailwind elements for multiple things, I'd appreciate such a component...
Hi! Autocomplete is a component we are planning to add in a future. Here you can see how it is most likely going to work https://mdbootstrap.com/docs/standard/forms/autocomplete/
@renky did you check the select input with data-te-select-filter
: https://tw-elements.com/docs/standard/forms/select/#search
Maybe this is what you are looking for.
@renky did you check the select input with
data-te-select-filter
: https://tw-elements.com/docs/standard/forms/select/#search Maybe this is what you are looking for.
Hi @AlxndrVgt : sure... but it doesn't fit. Autocomplete would also accept new values - it is a component mix of select and input-text ... search-option only searches in the given select-values.
@renky I think we should be adding the component on the 1.1.0 version.
I have the same problem as @renky; I need a field that allows the user to select multiple options while being able to search in a very extensive list of option data. This is not viable unless it is done via server.
Here is an example of the idea:
Just as @renky said https://yaireo.github.io/tagify/#section-mode-select, it offers this kind of service. In my case, I use https://choices-js.github.io/Choices/, which is a similar tool. However, the components of TW-Elements are far easier and more reliable to use, especially when used together with Tailwind.
Hi @Eduardo-XavierPaula, we have something similar on our list of ideas, so it may be added in the future.