Autocomplete on Textinput

Any chance we will see an autocomplete feature soon?
My use case would be to give the user a suggestion bar below the input field.

Similar to amazon

1 Like

What you can do right now is show a container with a list of suggestions underneath the text box, and then when clicking on a suggestion, set the input to the clicked value.

I.e.

[   pageVars.textInput   ]
--------------------------  << container Visible bound to formula
| option 1               |       LENGTH(pageVars.textInput) < 3
| option 2               |  << options repeat from array of suggestions;
| option 3               |       SELECT(appVars.allSuggestions, CONTAINS(item, pageVars.textInput))
--------------------------

What is the data type required for appVars.allSuggestions? “List” doesn’t seem to work, how would Array be constructed here?

Thanks:-)

To utilize the Repeat with functionality, the binding must be of type List of Objects. In this case, it could be as simple as:

[
  { suggestion: "Option 1" },
  { suggestion: "Option 2" },
  { suggestion: "Option 2" }
]
1 Like

Thank you @Harri_Sarsa

Still struggling a bit. Text input field is now page variable “textinput” and the Paragraph in the same container has Repeat With formula “SELECT(appVars.ticker_suggestions, CONTAINS(item, pageVars.textInput))” but what should the field Content for the Paragraph be? Should the repeated item be something else than “Paragraph”?

Sorry for not getting back to this! The content of the paragraph should then be bound to current.suggestion. The repeated item can be just paragraph, though by repeating a Container with the Paragraph inside it you’d get more flexibility on formatting the layout.