Skip to content

[sync] fix(suggestion): scroll long option lists inside the popup (#1983) - #165

Merged
cc-hearts merged 1 commit into
mainfrom
sync/ant-design-x-1983
Aug 4, 2026
Merged

[sync] fix(suggestion): scroll long option lists inside the popup (#1983)#165
cc-hearts merged 1 commit into
mainfrom
sync/ant-design-x-1983

Conversation

@cc-hearts

@cc-hearts cc-hearts commented Aug 4, 2026

Copy link
Copy Markdown
Member

背景

同步上游 ant-design/x#1983(merge commit 39c0ac235158c98f616a6b6dec85f1d2ae876cd8)。

Suggestion 选项过多时弹层会持续增高,并可能被 Sender 遮挡。此前 packages/x/components/suggestion/style/index.ts 只对 Cascader menu 设置了 height: auto,没有高度上限,也没有内部滚动。

实现范围

  • Cascader menu 增加 maxHeight: 256overflowY: "auto",与上游一致(数值写法沿用仓库内 file-cardmaxHeight: 68 风格)
  • 新增 demo/long-list.vue(30 个选项),中英文档各挂载一条
  • 补充回归测试:长列表下全部选项渲染且首尾可达

验收标准

  • 25+ 建议项不再撑破视口
  • 所有选项可通过滚动访问
  • 键盘导航与选择行为不变(未改动 useActive.ts 等交互逻辑,仅样式层新增两条属性)
  • 文档 demo 展示滚动行为

Ref #149
close #148

Cap the Suggestion cascader menu height and scroll the overflow inside
the popup, so a long option list no longer keeps growing and covering
the Sender.

Sync ant-design/x#1983.

close #148
@cc-hearts
cc-hearts merged commit 5aca66a into main Aug 4, 2026
1 check passed
@cc-hearts
cc-hearts deleted the sync/ant-design-x-1983 branch August 4, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sync][P2] Suggestion: 长列表支持弹层内部滚动 (#1983)

1 participant