[sync] fix(suggestion): scroll long option lists inside the popup (#1983) - #165
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
同步上游 ant-design/x#1983(merge commit
39c0ac235158c98f616a6b6dec85f1d2ae876cd8)。Suggestion 选项过多时弹层会持续增高,并可能被 Sender 遮挡。此前
packages/x/components/suggestion/style/index.ts只对 Cascader menu 设置了height: auto,没有高度上限,也没有内部滚动。实现范围
maxHeight: 256与overflowY: "auto",与上游一致(数值写法沿用仓库内file-card的maxHeight: 68风格)demo/long-list.vue(30 个选项),中英文档各挂载一条验收标准
useActive.ts等交互逻辑,仅样式层新增两条属性)Ref #149
close #148