Skip to content

Commit

Permalink
fix(data-table): check all if indeterminate header checkbox is clicked,
Browse files Browse the repository at this point in the history
closes #1827
  • Loading branch information
07akioni committed Dec 12, 2021
1 parent acdd696 commit 664a08d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Fix `n-data-table`'s pagination `onUpdatePageSize` prop does't trigger, closes [#1774](https://github.com/TuSimple/naive-ui/issues/1774).
- Fix `n-tag` line-height is too low that clamps the content.
- Fix `n-select` displays with mistake in input if `filterable` is `true`, closes [#1823](https://github.com/TuSimple/naive-ui/issues/1823).
- Fix `n-data-table` uncheck all if indeterminate header checkbox is clicked, closes [#1827](https://github.com/TuSimple/naive-ui/issues/1827).

### Feats

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- 修复 `n-data-table` 的分页器 `onUpdatePageSize` 属性未被触发, 关闭 [#1774](https://github.com/TuSimple/naive-ui/issues/1774)
- 修复 `n-tag` 行高过低导致内容截断
- 修复 `n-select` 设定 `filterable` 后选项过长显示出错,关闭 [#1823](https://github.com/TuSimple/naive-ui/issues/1823)
- 修复 `n-data-table` 点击表头半选的勾选框之后没有全选,关闭 [#1827](https://github.com/TuSimple/naive-ui/issues/1827)

### Feats

Expand Down
2 changes: 1 addition & 1 deletion src/data-table/src/TableParts/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default defineComponent({
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
} = inject(dataTableInjectionKey)!
function handleCheckboxUpdateChecked (): void {
if (someRowsCheckedRef.value || allRowsCheckedRef.value) {
if (allRowsCheckedRef.value) {
doUncheckAll()
} else {
doCheckAll()
Expand Down

0 comments on commit 664a08d

Please sign in to comment.