Has anyone created an autocomplete text input?

Has anyone created an autocomplete text input?
12 Replies
zydnrbrn
zydnrbrn6mo ago
i think u can create that with custom components with alpine.js or whatever you like
Arthur Minasyan
Arthur Minasyan6mo ago
Yes, I know, just in case someone already had one, I wouldn't waste time.
awcodes
awcodes6mo ago
Why not just use a searchable select field?
Arthur Minasyan
Arthur Minasyan6mo ago
Imagine that you entered on the phone and you need to press select to open the search input, then press input to activate it. it is desirable to write in the input at once.
awcodes
awcodes6mo ago
A searchable select will do that when you click it opens the drop down and focuses the tyable area. Iirc Could also use a TextInput as a data list but the options are predefined and not tied to a relationship.
Arthur Minasyan
Arthur Minasyan6mo ago
In my case, it should search from third-party API.
krekas
krekas6mo ago
Can be done with the select also
Arthur Minasyan
Arthur Minasyan6mo ago
I know, but that is not what i needed. After typing in the input, the dropdown should open.
krekas
krekas6mo ago
then build your own custom. would have done in such time
Arthur Minasyan
Arthur Minasyan6mo ago
That's what I'm going to do, just in case someone already had one, so I wouldn't waste time on it
awcodes
awcodes6mo ago
Do what you need but it’s the same amount of steps. Click text field, type. Click select field type. 🙂
Arthur Minasyan
Arthur Minasyan5mo ago
In the case of Select, it is 2 times. One to open the dropdown and one more to focus the input when using mobile. And you will click on input once to focus and type. In addition, in my opinion, the input version is more preferable as a user of the website.
Want results from more Discord servers?
Add your server
More Posts