Skip to content

Commit

Permalink
fix(components/dropdown): 修复 Dropdown 有 children 的 option 可以点击的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxinssfd committed Aug 5, 2023
1 parent 1176623 commit 3d8f0b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/src/dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const Dropdown: React.FC<DropdownProps> = (props) => {

const onClick = (e: React.MouseEvent<HTMLElement>) => {
e.stopPropagation();
if (opt.disabled || opt.type === 'group') return;
if (opt.disabled || opt.type === 'group' || children?.length) return;
emit(opt, parents);
};
const option = (
Expand Down

0 comments on commit 3d8f0b8

Please sign in to comment.