Skip to content

Commit

Permalink
fix(grid): [grid] fix selection header disabled error when config che…
Browse files Browse the repository at this point in the history
…ckField (#2647)
  • Loading branch information
gimmyhehe authored and kagol committed Dec 16, 2024
1 parent 7f4a315 commit 8dd880d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/vue/src/grid/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{
"name": "@opentiny/vue-grid",
"type": "module",
"version": "3.20.0",
"version": "3.20.1",
"description": "",
"license": "MIT",
"sideEffects": false,
"main": "lib/index.js",
"module": "index.ts",
"sideEffects": false,
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "catalog:"
},
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
"//postversion": "pnpm build"
Expand All @@ -31,5 +28,8 @@
"@opentiny/vue-theme": "workspace:~",
"@opentiny/vue-tooltip": "workspace:~"
},
"license": "MIT"
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "catalog:"
}
}
2 changes: 2 additions & 0 deletions packages/vue/src/grid/src/checkbox/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export default {
: (row) => get(row, checkField)
someHandler = (row) => get(row, checkField) || ~treeIndeterminates.indexOf(row)
this.isAllSelected = false
this.headerCheckDisabled =
checkMethod && afterFullData.length && afterFullData.every((row, rowIndex) => !checkMethod({ row, rowIndex }))
afterFullData.length && (this.isAllSelected = afterFullData.every(everyHandler))
this.isIndeterminate = !this.isAllSelected && afterFullData.some(someHandler)
} else {
Expand Down

0 comments on commit 8dd880d

Please sign in to comment.