Any tricks getting a dropdown to accept a custom value when "allow custom values" is ticked?

I have a dropdown that takes an array of values and labels from a query. But I want to be able to type in a custom value in some cases. So I ticked the Allow custom values checkbox in the dropdown settings - but it still won’t “take” a custom value that is typed in, after pressing enter or taking the focus away from the dropdown element.

Is there something I’m missing here ?

The multiselect component has an option of “allow user defined values” in addition to the allow custom values option, and they behave slightly differently.

Allow custom values: if the .value of the component is not present inside of the array of options, display it anyways. This could be set by .setValue or the initial value setting of the component.

Allow user defined values (multiselect)- users can select their search value as an additional option. Allow custom values doesn’t need to be enabled for this to work at the moment

We definitely need to add the same Allow user defined values functionality to the dropdown, at the moment the best workaround is to set the values array to something like [1,2,3].concat(select1.searchValue) which would add the searchValue (the user input) to the array of options to select.

1 Like