File tree Expand file tree Collapse file tree 3 files changed +37
-10
lines changed
src/components/Forms/Field Expand file tree Collapse file tree 3 files changed +37
-10
lines changed Original file line number Diff line number Diff line change 4444 "delete" : " Delete" ,
4545 "delete.all" : " Delete all" ,
4646
47+ "deselect" : " Deselect" ,
48+ "deselect.all" : " Deselect all" ,
49+
4750 "dialog.fields.empty" : " This dialog has no fields" ,
4851 "dialog.files.empty" : " No files to select" ,
4952 "dialog.pages.empty" : " No pages to select" ,
664667
665668 "security" : " Security" ,
666669 "select" : " Select" ,
670+ "select.all" : " Select all" ,
667671 "server" : " Server" ,
668672 "settings" : " Settings" ,
669673 "show" : " Show" ,
Original file line number Diff line number Diff line change 1414 class =" k-field-counter"
1515 />
1616
17- <label v-if =" batch" >
18- <input ref =" batch" type =" checkbox" @input =" batchSelect" />
19- <span class =" sr-only" >select/deselect all</span >
20- </label >
17+ <k-button-group v-if =" batch" layout =" collapsed" >
18+ <k-button
19+ :disabled =" value.length === 0"
20+ :responsive =" true"
21+ icon =" deselect-all"
22+ size =" xs"
23+ variant =" filled"
24+ @click =" deselectAll"
25+ >
26+ {{ $t("deselect.all") }}
27+ </k-button >
28+ <k-button
29+ :disabled =" value.length === options.length"
30+ :responsive =" true"
31+ icon =" select-all"
32+ size =" xs"
33+ variant =" filled"
34+ @click =" selectAll"
35+ >
36+ {{ $t("select.all") }}
37+ </k-button >
38+ </k-button-group >
2139 </template >
2240
2341 <k-empty
@@ -58,12 +76,11 @@ export default {
5876 this .checkBatchToggleState ();
5977 },
6078 methods: {
61- batchSelect (e ) {
62- if (e .target .checked ) {
63- this .$refs .input .selectAll ();
64- } else {
65- this .$refs .input .deselectAll ();
66- }
79+ deselectAll () {
80+ this .$refs .input .deselectAll ();
81+ },
82+ selectAll () {
83+ this .$refs .input .selectAll ();
6784 },
6885 checkBatchToggleState () {
6986 // indeterminate state
You can’t perform that action at this time.
0 commit comments