Skip to content

Commit

Permalink
fix(react): fix CompositePanel onChange
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Oct 14, 2021
1 parent 1f3dcf3 commit d928b69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react/src/panels/CompositePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ export const CompositePanel: React.FC<ICompositePanelProps> & {
} else {
setVisible(true)
}
setActiveKey(item.key)
if (!props?.activeKey || !props?.onChange)
setActiveKey(item.key)
}
item.onClick?.(e)
props.onChange?.(item.key)
Expand Down

0 comments on commit d928b69

Please sign in to comment.