Remove the default "Create XXX" from options #4612
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hello @assaf-itzikson, do I understand you correctly, that you don't want the If you just want the option to appear for certain conditions (e.g. value starting with <Creatable isValidNewOption={(inputValue) => inputValue && inputValue.startsWith('@') && /* Check for existing value */} /> |
Beta Was this translation helpful? Give feedback.


Hello @assaf-itzikson,
do I understand you correctly, that you don't want the
Create ...option? If so, I recommend not using theCreatablecomponent and instead going for the defaultSelectcomponent, as the option is crucial for the functionality of theCreatablecomponent and removing it would just leave unused code in your bundle.If you just want the option to appear for certain conditions (e.g. value starting with
@), I recommend using theisValidNewOptionprop, which accepts a function as its value. This function gets the value of the search input as its first argument.