Open stizzlestizzle opened 7 years ago
<SimpleSelect
...
renderOption={(arg) =>{
var label, newOption, selectable, isSelectable;
if (arg != null) {
label = arg.label, newOption = arg.newOption, selectable = arg.selectable;
}
isSelectable = typeof selectable === 'undefined' || selectable;
return (
<div className={"simple-option " + (isSelectable ? '' : 'not-selectable')}>
<span>{!!newOption ? "CUSTOM_LABEL" + label + "..." : label}</span>
</div>
)
}}
/>
Thanks for this plugin!
Currently, if
createFromSearch
is enabled and a new option is being entered by the user, the string Add {label}... is displayed. This string is hard-coded and the only way to override it is to provide a customrenderOption
which seems overkill to me.It would be nice to have an option to simply specify the desired string.