Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(select): 修复 flattenOptions 方法分组扁平化问题及上下键切换功能 #3278

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

dhwebs
Copy link
Contributor

@dhwebs dhwebs commented Aug 21, 2024

  • 修复了 flattenOptions 函数未正确扁平化分组,导致在分组间切换时上下键无法正确切换的问题。
  • 修复了上下键切换时,激活项未能滚动到下拉面板视口内的问题。

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

issue链接 :#3272

💡 需求背景和解决方案

需求背景: 展开下拉框后,用键盘的方向键向下选取,当选项数量多超出下拉面板有滚动条时,继续用方向键向下,下拉面板内容不会跟着滚动。
解决方案:在监听上下键事件的地方,加上滚动方法 setHoverIntoView,使键盘选取项滚动到下拉面板视口

📝 更新日志

  • fix(Select): 修复分组状态下,通过上下键切换时下拉面板不会跟随滚动的问题

  • fix(Select): 修复分组状态下,通过上下键切换时无法正确切换的问题

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

>>
>> - 修复了 flattenOptions 函数未正确扁平化分组的问题,导致在分组间切换时上下键无法正确切换。
>> - 修复了上下键切换时,激活项未能滚动到下拉面板视口内的问题。
Copy link
Contributor

github-actions bot commented Aug 21, 2024

完成

@dhwebs dhwebs closed this Aug 21, 2024
@dhwebs dhwebs reopened this Aug 21, 2024
@dhwebs dhwebs closed this Aug 21, 2024
@dhwebs dhwebs reopened this Aug 21, 2024
@uyarn uyarn merged commit 959742c into Tencent:develop Aug 21, 2024
5 checks passed
uyarn pushed a commit that referenced this pull request Aug 29, 2024
…3278)

* fix(select): 修复 flattenOptions 方法分组扁平化问题及上下键切换功能
>>
>> - 修复了 flattenOptions 函数未正确扁平化分组的问题,导致在分组间切换时上下键无法正确切换。
>> - 修复了上下键切换时,激活项未能滚动到下拉面板视口内的问题。

* fix(select): 修复新增的setHoverIntoView方法下常量没给定类型导致lint校验失败
uyarn added a commit that referenced this pull request Aug 29, 2024
* fix(select): fix keyboard up down behaviour when using group config(#3278)

* fix(select): 修复 flattenOptions 方法分组扁平化问题及上下键切换功能
>>
>> - 修复了 flattenOptions 函数未正确扁平化分组的问题,导致在分组间切换时上下键无法正确切换。
>> - 修复了上下键切换时,激活项未能滚动到下拉面板视口内的问题。

* fix(select): 修复新增的setHoverIntoView方法下常量没给定类型导致lint校验失败

* fix(ColorPicker):  selectInputProps API can't work  (#3279)

* fix(color-picker):修复ColorPicker透传SelectInputProps无效问题

* fix(color-picker): 修复color-picker组件的selectInputProps属性失效问题

---------

Co-authored-by: taninsist <taninsist@gmail.com>

* fix(TimePicker): fixed only support hh:mm format (#3280)

* fix(TimePicker): fix disableTime position value always being `start` (#3281)

* fix(TimePicker): fixed only support hh:mm format

* fix(TimePicker): disabled position only is  start

* perf: use getPickerCols (#3283)

* feat(form): formErrorMessage add whitespace (#3284)

* feat(List): support scroll API  (#3286)

* feat(list): support virtual scroll

* feat(list): support virtual scroll

* chore: fix docs and demo

* chore: fix lint

* chore: fix lint

* chore: fix test

* chore: fix test

* chore: fix test

* feat(config-provider): support colonText rateText checkIcon (#3288)

* docs(Input): value type remove Number

* feat(config-provider): support colonText rateText  checkIcon

* chore: fix lint

* chore: fix lint

* chore: update snapshot

* chore: fix doc

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat(empty): add new component Empty (#3287)

* feat(empty): new Empty component

* fix(empty): fix render svg

* perf(empty): optimization code

* chore(settings): revert vscode settings file

* chore(empty): rm overage file

* chore: fix demo

* chore: fix docs

* chore: fix demo

* chore: update snapshot

* chore: fix test

---------

Co-authored-by: Uyarn <uyarnchen@gmail.com>

* fix(badge): fix content api (#3289)

* fix(cascader): cascader panel support option slot (#3290)

* chore: release 1.10.0 (#3291)

* chore: release 1.10.0

* chore: update CHANGELOG

* chore: release 1.10.0-naruto

---------

Co-authored-by: dhwebs <53416746+dhwebs@users.noreply.github.com>
Co-authored-by: taninsist <78793442+taninsist@users.noreply.github.com>
Co-authored-by: taninsist <taninsist@gmail.com>
Co-authored-by: myron <myronliu347@gmail.com>
Co-authored-by: liweijie0812 <674416404@qq.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Haixing <65376724+HaixingOoO@users.noreply.github.com>
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.

2 participants