|
|
@ -8,10 +8,9 @@ |
|
|
export let disabled = false |
|
|
export let disabled = false |
|
|
export let error = null |
|
|
export let error = null |
|
|
export let options = [] |
|
|
export let options = [] |
|
|
export let callbackOptionValue = null |
|
|
|
|
|
export let getOptionLabel = option => option |
|
|
export let getOptionLabel = option => option |
|
|
export let getOptionValue = option => option |
|
|
export let getOptionValue = option => option |
|
|
export let getOptionIcon = option => option |
|
|
export let getOptionIcon = null |
|
|
export let readonly = false |
|
|
export let readonly = false |
|
|
export let quiet = false |
|
|
export let quiet = false |
|
|
export let autoWidth = false |
|
|
export let autoWidth = false |
|
|
@ -47,7 +46,7 @@ |
|
|
const index = options.findIndex( |
|
|
const index = options.findIndex( |
|
|
(option, idx) => getOptionValue(option, idx) === value |
|
|
(option, idx) => getOptionValue(option, idx) === value |
|
|
) |
|
|
) |
|
|
return index !== -1 ? getOptionIcon(options[index], index) : value |
|
|
return index !== -1 ? getOptionIcon(options[index], index) : null |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const selectOption = value => { |
|
|
const selectOption = value => { |
|
|
@ -71,7 +70,6 @@ |
|
|
{getOptionValue} |
|
|
{getOptionValue} |
|
|
{getOptionIcon} |
|
|
{getOptionIcon} |
|
|
{fieldIcon} |
|
|
{fieldIcon} |
|
|
{callbackOptionValue} |
|
|
|
|
|
isPlaceholder={value == null || value === ""} |
|
|
isPlaceholder={value == null || value === ""} |
|
|
placeholderOption={placeholder} |
|
|
placeholderOption={placeholder} |
|
|
isOptionSelected={option => option === value} |
|
|
isOptionSelected={option => option === value} |
|
|
|