Skip to content

Commit

Permalink
fix(dropdown): disable overlay visible when options length is 0 (#2860)
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn authored Apr 24, 2024
1 parent be2bf1e commit ee4a2d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const Dropdown: React.FC<DropdownProps> & {
};

const handleVisibleChange = (visible: boolean, context: PopupVisibleChangeContext) => {
if (disabled) return;
if (disabled || !options.length) return;
togglePopupVisible(visible);
popupProps?.onVisibleChange?.(visible, context);
};
Expand Down

0 comments on commit ee4a2d1

Please sign in to comment.