-
Notifications
You must be signed in to change notification settings - Fork 362
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(table): 修复可选中行table组件,data为空数据时,默认全选按钮会选中的问题 #1150
Conversation
src/table/hooks/useRowSelect.tsx
Outdated
@@ -65,12 +65,14 @@ export default function useRowSelect(props: TdPrimaryTableProps) { | |||
|
|||
// eslint-disable-next-line | |||
function getSelectedHeader(h: CreateElement) { | |||
const isIndeterminate = intersectionKeys.value.length > 0 && intersectionKeys.value.length < canSelectedRows.value.length; | |||
const isChecked = intersectionKeys.value.length |
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.
Checkbox 的参数 checked
数据类型是 boolean
。
当前的计算方式 可能出现 checked=0
,不符合预期,需添加 Boolean 进行数据类型转换
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.
好的,我修改下
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.
已修改
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.
3fcf8c7
to
abe8e83
Compare
修复可选中行table组件,data为空数据时,默认全选按钮会选中的问题
abe8e83
to
8eab365
Compare
@chaishi 看起来和你的改动有冲突 |
@qdzhaoxiaodao 别误会 应该是你提的时候刚好一直CI有问题 我们在CHANGELOG上说明一下 |
@qdzhaoxiaodao #1172 看了一下其实PR有提到是同步你的代码的 然后我们CHANGELOG上补充下是by you |
@qdzhaoxiaodao 不好意思,这个 PR 我提的,是 vue-next 的 pr 合掉了,这边顺手把vue这边处理了,我在 pr 里面有标注着这个 PR 的来源,后续此类修复会在PR合并的时候询问是否有修复 react 和 vue2 的意愿。 |
了解 |
修复可选中行table组件,data为空数据时,默认全选按钮会选中的问题
🤔 这个 PR 的性质是?
🔗 相关 Issue
#1143
💡 需求背景和解决方案
修复后
原因 对空数据没进行判断 解决方案 对空数据做处理
📝 更新日志
fix(table): 修复可选中行table组件,data为空数据时,默认全选按钮会选中的问题
本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单