Skip to content

Commit

Permalink
fix(components/dropdown): 修复选项属性 onClick 无效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxinssfd committed Aug 5, 2023
1 parent 3d8f0b8 commit a7600cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/components/src/dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export const Dropdown: React.FC<DropdownProps> = (props) => {
};

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

0 comments on commit a7600cc

Please sign in to comment.