Skip to content

Commit

Permalink
feat(cascader): click item to close panel when trigger is hover (#3389)
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn authored Nov 8, 2024
1 parent a7cdc03 commit 77eb9b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cascader/core/effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export function expendClickEffect(
// 非受控状态下更新状态
setValue(valueType === 'single' ? value : node.getPath().map((item) => item.value), 'check', node.getModel());

if (!checkStrictly) {
// 当 trigger 为 hover 时 ,点击节点一定是关闭 panel 的操作
if (!checkStrictly || propsTrigger === 'hover') {
setVisible(false, {});
}
}
Expand Down

0 comments on commit 77eb9b3

Please sign in to comment.