Skip to content

Commit

Permalink
fix: 修复 Cascader 开启 final hover-only 且多选的情况下 hover-only 失效的问题 (#2160)
Browse files Browse the repository at this point in the history
Co-authored-by: 颜宇浩 <[email protected]>
  • Loading branch information
KMS-Bismarck and 颜宇浩 authored Nov 28, 2024
1 parent 2f38b86 commit 2210c76
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shineout",
"version": "2.0.26-beta.2",
"version": "2.0.26-beta.3",
"description": "Shein 前端组件库",
"main": "./lib/index.js",
"module": "./es/index.js",
Expand Down
4 changes: 4 additions & 0 deletions site/pages/documentation/changelog/2.x.x.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 更新日志

### 2.0.26-beta.3

- 修复 Cascader 开启 final hover-only 且多选的情况下 hover-only 失效的问题 (< 2.0.26)

### 2.0.26-beta.2

- 修复 Menu 设置 frontCaret 属性后,二级及以下菜单的折叠图标与展开状态不一致的问题 (< 2.0.26)
Expand Down
6 changes: 5 additions & 1 deletion src/Cascader/Node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ class Node<U, T extends CascaderBaseValue> extends PureComponent<NodeProps<U, T>
}
if (expandTrigger === 'hover' || expandTrigger === 'hover-only') {
events.onMouseEnter = this.handlePathChange
if (multiple) events.onClick = this.handleSelect
if (multiple) {
if (!(expandTrigger === 'hover-only' && hasChildren)) {
events.onClick = this.handleSelect
}
}
}
const caret = <span className={cascaderClass(getDirectionClass('caret'))}>{<Caret />}</span>

Expand Down

0 comments on commit 2210c76

Please sign in to comment.