packages/app/src/components/AppForm/FormGroupSelect.js
// add missing option from value, for creatable (and initial value)
add missing option from value, for creatable (and initial value)
add missing option from value for creatable ( and initial value )
function ensureOptionCreate(options = [], value, createOptions) {
  if (value && !findOption(options, value)) {
    const { createOptionPosition, getNewOptionData, isValidNewOption } =
      createOptions;
    if (isValidNewOption(value, options)) {
      const newOption = getNewOptionData(value, value);
      options =
        createOptionPosition === "first"
          ? [newOption, ...options]
          : [...options, newOption];
    }
  }
  return options;
}
function ensureOptionCreate ( options = [ ] , value , createOptions ) { if ( value && ! findOption ( options , value ) ) { const { createOptionPosition , getNewOptionData , isValidNewOption } = createOptions ; if ( isValidNewOption ( value , options ) ) { const newOption = getNewOptionData ( value , value ) ; options = createOptionPosition === "first" ? [ newOption , ... options ] : [ ... options , newOption ] ; } } return options ; }
add missing option from value, for creatable (and initial value)
add missing option from value for creatable ( and initial value )