Repository navigation
feat(module:cascader): control the visibility of menu by nzOpen - #9448
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9448 +/- ##
==========================================
+ Coverage 91.29% 91.40% +0.11%
==========================================
Files 561 563 +2
Lines 19753 19824 +71
Branches 3163 3176 +13
==========================================
+ Hits 18034 18121 +87
+ Misses 1371 1358 -13
+ Partials 348 345 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
251acd8 to
8e14e4f
Compare
|
In addition to |
| } | ||
|
|
||
| private moveLeft(): void { | ||
| private prevColumn(): void { |
There was a problem hiding this comment.
我观察了下 antd 的交互,当前仅一列时 prevColumn 会关闭弹出面板,也许我们可以在这里补充上:)
BTW,我发现还有一些键盘交互我们还没有支持或者支持得不够好,分别举例:
- 不支持多选模式下通过回车键选中/取消选中选项
- focus 输入框后,可以使用方向键唤起弹出面板。其中方向键为 DOWN 或 RIGHT 时,没有默认选中第一列第一行(事实上 antd 的行为等价于 open + down/right,而 zorro 只做了 open)
我们可以在单独的 PR 里优化这些键盘交互问题
There was a problem hiding this comment.
已补充。此外,还发现一个问题:如果已经存在某个值了zhejiang,hangzhou,xihu,点开 cascader 的时候会自动高亮所有列,如果我向左依次点到 zhejiang,那么 hangzhou 的高亮会消失,xihu 所在列会折叠起来。此时,点击外部区域让菜单收起,这个行为应该是没有选择结果,值应该还是 zhejiang, hangzhou, xihu,再次点开 cascader,则不会高亮所有列,这和 antd 不一致,
复线 👇
2025-10-10.18.07.23.mov
There was a problem hiding this comment.
focus 输入框后,可以使用方向键唤起弹出面板。其中方向键为 DOWN 或 RIGHT 时,没有默认选中第一列第一行(事实上 antd 的行为等价于 open + down/right,而 zorro 只做了 open)
@Laffery 这个没复现出来,zorro 和 antd 的行为是一致的吧?
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the new behavior?
If
nzOpenis not undefined, the visibility of the menu is completely controlled bynzOpen, which is consistent with Ant Design.Does this PR introduce a breaking change?