File tree Expand file tree Collapse file tree 4 files changed +20
-1
lines changed Expand file tree Collapse file tree 4 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public function mountWithColumnSelect(): void
29
29
// Get a list of visible default columns that are not excluded
30
30
$ columns = collect ($ this ->getColumns ())
31
31
->filter (function ($ column ) {
32
- return $ column ->isVisible () && $ column ->isSelectable ();
32
+ return $ column ->isVisible () && $ column ->isSelectable () && $ column -> isSelected () ;
33
33
})
34
34
->map (fn ($ column ) => $ column ->getHash ())
35
35
->values ()
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ class Column
49
49
protected $ labelCallback ;
50
50
protected bool $ hidden = false ;
51
51
protected bool $ selectable = true ;
52
+ protected bool $ selected = true ;
52
53
protected bool $ secondaryHeader = false ;
53
54
protected $ secondaryHeaderCallback ;
54
55
protected bool $ footer = false ;
Original file line number Diff line number Diff line change @@ -149,6 +149,16 @@ public function excludeFromColumnSelect(): self
149
149
return $ this ;
150
150
}
151
151
152
+ /**
153
+ * @return $this
154
+ */
155
+ public function deselect (): self
156
+ {
157
+ $ this ->selected = false ;
158
+
159
+ return $ this ;
160
+ }
161
+
152
162
/**
153
163
* @param string $field
154
164
*
Original file line number Diff line number Diff line change @@ -413,6 +413,14 @@ public function isSelectable(): bool
413
413
return $ this ->selectable === true ;
414
414
}
415
415
416
+ /**
417
+ * @return bool
418
+ */
419
+ public function isSelected (): bool
420
+ {
421
+ return $ this ->selected === true ;
422
+ }
423
+
416
424
/**
417
425
* @return bool
418
426
*/
You can’t perform that action at this time.
0 commit comments