Best way to create a dropdown input which has an "editable" option

How do I do this?

  • A list of options is displayed (static or dynamic)
  • When user selects the option “Other”, the input converts to a text input.

Since our select has a default click method(selecting the value and closing the dropdown) I think you wil have to with a more custom approach

I would make a component with our dropdown element being a base, then I would have repeating list of a div with text for all the current options + a div that has a input

When the value of the item is Other you can conditionally display the input and bind the Read-only property to a variable that gets changed on click