Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
ba284c72
Commit
ba284c72
authored
Jan 30, 2018
by
杨奕
Committed by
GitHub
Jan 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Table: add disabled state to multiple selection header checkbox (#9543)
parent
ca02cb9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
packages/table/src/table-column.js
packages/table/src/table-column.js
+1
-0
packages/table/src/table-store.js
packages/table/src/table-store.js
+1
-0
No files found.
packages/table/src/table-column.js
View file @
ba284c72
...
@@ -34,6 +34,7 @@ const forced = {
...
@@ -34,6 +34,7 @@ const forced = {
selection
:
{
selection
:
{
renderHeader
:
function
(
h
,
{
store
})
{
renderHeader
:
function
(
h
,
{
store
})
{
return
<
el
-
checkbox
return
<
el
-
checkbox
disabled
=
{
store
.
states
.
data
&&
store
.
states
.
data
.
length
===
0
}
indeterminate
=
{
store
.
states
.
selection
.
length
>
0
&&
!
this
.
isAllSelected
}
indeterminate
=
{
store
.
states
.
selection
.
length
>
0
&&
!
this
.
isAllSelected
}
nativeOn
-
click
=
{
this
.
toggleAllSelection
}
nativeOn
-
click
=
{
this
.
toggleAllSelection
}
value
=
{
this
.
isAllSelected
}
/>
;
value
=
{
this
.
isAllSelected
}
/>
;
...
...
packages/table/src/table-store.js
View file @
ba284c72
...
@@ -298,6 +298,7 @@ TableStore.prototype.mutations = {
...
@@ -298,6 +298,7 @@ TableStore.prototype.mutations = {
toggleAllSelection
:
debounce
(
10
,
function
(
states
)
{
toggleAllSelection
:
debounce
(
10
,
function
(
states
)
{
const
data
=
states
.
data
||
[];
const
data
=
states
.
data
||
[];
if
(
data
.
length
===
0
)
return
;
const
value
=
!
states
.
isAllSelected
;
const
value
=
!
states
.
isAllSelected
;
const
selection
=
this
.
states
.
selection
;
const
selection
=
this
.
states
.
selection
;
let
selectionChanged
=
false
;
let
selectionChanged
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment