Skip to content

Commit 1027ce8

Browse files
committed
create custom value bug fix
1 parent e3299ed commit 1027ce8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -482,16 +482,16 @@ function MultiSelect({
482482
opts={options}
483483
{...{ singleSelect, addValue, checkValueExist, value }}
484484
/>
485-
) : (search && !search?.length) || (options && !options.length) ? (
486-
<option className='msl-option msl-option-disable'>
487-
{emptyDataLabel}
488-
</option>
485+
) : search && search.length ? (
486+
<Options
487+
opts={search}
488+
{...{ singleSelect, addValue, checkValueExist, value }}
489+
/>
489490
) : (
490-
search && (
491-
<Options
492-
opts={search}
493-
{...{ singleSelect, addValue, checkValueExist, value }}
494-
/>
491+
((search && !search.length) || (options && !options.length)) && (
492+
<option className='msl-option msl-option-disable'>
493+
{emptyDataLabel}
494+
</option>
495495
)
496496
)}
497497
</div>

0 commit comments

Comments
 (0)