Skip to content

Commit 766c3bf

Browse files
Update src/Select.tsx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 7429a9e commit 766c3bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ const Select = React.forwardRef<BaseSelectRef, SelectProps<any, DefaultOptionTyp
439439
if (Array.isArray(item.options)) {
440440
return {
441441
...item,
442-
options: sorter(item.options),
442+
options: item.options.length > 0 ? sorter(item.options) : item.options,
443443
};
444444
}
445445
return item;

0 commit comments

Comments
 (0)