octopusthink / nautilus

Inclusive, open-source design system and React component library.
https://nautilus.octopusthink.com
MIT License
2 stars 0 forks source link

ComboBox: Add "add new item" option #228

Open sarahmonster opened 4 years ago

sarahmonster commented 4 years ago

Per our documentation, here's what we're looking for here:

If a user can't find the result they're looking for, they should be able to add a new item directly from the ComboBox component if the datasource allows for user editing. This option should be the last item in the list and should always be visible. When the user has entered a search string, update the text in the label to refer to the entered text (eg: "Create new item "search term").

It's best if users can add the new item immediately, with a single action, by selecting the item from the list. If necessary, you can open a secondary interface to collect additional information, but keep in mind that this increases the complexity of your interface. It's best to provide sensible defaults and allow users to edit them as a separate task. Only use a secondary interface when it's absolutely critical to collect this information immediately.

I can mock this up and/or start a "visual stuff" PR whenever we're ready to start working on this!