-
Notifications
You must be signed in to change notification settings - Fork 338
feat(select): support checkAll in filterable mode #3516
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
base: develop
Are you sure you want to change the base?
Conversation
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for the checkAll feature when the Select component is in filterable mode.
- In Select.tsx, the input value is reset when applicable.
- In PopupContent.tsx, checkAllStatus is computed with useMemo and passed to child options.
- In Option.tsx, selection logic is updated to use checkAllStatus when checkAll is enabled.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
packages/components/select/base/Select.tsx | Resets input value when reserveKeyword is false in filterable mode. |
packages/components/select/base/PopupContent.tsx | Introduces memoized checkAllStatus for managing select-all state. |
packages/components/select/base/Option.tsx | Updates multi-select logic to use checkAllStatus for checkAll options. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
预期点击全选,会需要保留之前已选的选项,目前的实现,会把之前的已选项都清空
补充了过滤时的逻辑,全选时合并、取消全选时排除 |
🤔 这个 PR 的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
Select组件在filterable模式下需要支持checkAll属性
📝 更新日志
feat(select): filterable模式下支持checkAll
☑️ 请求合并前的自查清单