Skip to content

Commit

Permalink
feat(cascader): click item to close panel when trigger is hover (#4717)
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn authored Nov 9, 2024
1 parent 93c7f08 commit af68adb
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 @@ -47,7 +47,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 af68adb

Please sign in to comment.