Is it possible to use Wix Text Input to display the contents of a collection ?

In the search of youtube.com, when you enter a character, a drop-down window will appear, showing all the content related to the character, for example, if I enter li, then the related character will appear in the drop-down window (This content should come from the relevant database), see the figure below. May I use wix text input to achieve such a function?

Thank you !

https://www.vorbly.com/Vorbly-Code/WIX-CUSTOMIZED-SEARCH-BAR-USING-REPEATERS

https://www.wix.com/corvid/forum/community-discussion/autocomplete-dropdown-search-function-on-wix-site
https://www.wix.com/corvid/forum/community-discussion/textbox-autocomplete-from-database
https://www.wix.com/corvid/forum/community-discussion/dropdown-menu-with-search-as-you-type

Thank give me some basic ideas, then I want to use onChange() event for input element . But I find it alway not fired when input element has some change in input area, do you know why ?
Thank you!

@laizhihong You’ll want to use the onInput() event handler which does trigger whenever the input element receives input.

If you are talking about the onChange on a text input then it will only work when the user manually types in the user input themselves.

If you add a value to the text input through code, then it will not register that event and won’t work

https://www.wix.com/corvid/reference/$w.TextInput.html#onChange
Description
An element receives a change event when a user changes the value in an input element.
A change event is not triggered when you change an element’s value using the element’s value property

@yisrael-wix

Good timing, however there is no best answer option to put on yours.:tumbler_glass:

@givemeawhisky Yeah - but a wee dram is just about the same as a best answer option.

@yisrael-wix i try onInput(), but it doesn’t work. Thank you for your message.

i use a text input and a repeater, and write a script with javascript to monitor the textinput value, then it works very similar to Youtube research, Thank you !