components icon indicating copy to clipboard operation
components copied to clipboard

[Feature Request]: Autosuggest - option to disabled plaintext entry

Open brianfoody opened this issue 2 years ago • 1 comments

Description

I'd like to be able to enforce that AutoSuggest components require one of the suggested items rather than customers being able to enter a plaintext field through the enteredTextLabel.

I find it much better to use than a select component for quickly iterating though form inputs but being able to enter plaintext inhibits the usage.

Code of Conduct

brianfoody avatar Aug 02 '22 08:08 brianfoody

Hello,

Can you please tell us a little bit more about your use-case? What types of options can the user choose from here? And why do you not accept free text?

one of the main differences between Autosuggest and Select is the fact that Autosuggest allows free text input. You can think of the Autosuggest component as a regular text input that gives you suggestions. But at the end of the day, the value of an Autosuggest is an arbitrary text string.

If you have a finite list of options that the user needs to choose from, we recommend using the Select or Multiselect components. You can find more information about this in our Selection in forms pattern article.

timogasda avatar Aug 03 '22 09:08 timogasda

Hey @timogasda . It's basically a select dropdown I just feel like the flow of typing from one entry to the next is really nice as the list filters rather than a giant select box.

It's all good though. I'm going to go a different path with the form using CMDK so I'll close this now that I understand your design patterns.

brianfoody avatar Aug 10 '22 06:08 brianfoody