File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public function mountWithColumnSelect(): void
21
21
22
22
// Get a list of visible default columns that are not excluded
23
23
$ columns = collect ($ this ->columns ())
24
- ->filter (fn ($ column ) => $ column ->isVisible () && $ column ->isSelectable ())
24
+ ->filter (fn ($ column ) => $ column ->isVisible () && $ column ->isSelectable () && $ column -> isSelected () )
25
25
->map (fn ($ column ) => $ column ->column ())
26
26
->values ()
27
27
->toArray ();
Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ class Column
74
74
*/
75
75
public bool $ selectable = true ;
76
76
77
+ /**
78
+ * @var bool
79
+ */
80
+ public bool $ selected = false ;
81
+
77
82
/**
78
83
* Column constructor.
79
84
*
@@ -335,4 +340,22 @@ public function isSelectable(): bool
335
340
{
336
341
return $ this ->selectable === true ;
337
342
}
343
+
344
+ /**
345
+ * @return $this
346
+ */
347
+ public function selected (): self
348
+ {
349
+ $ this ->selected = true ;
350
+
351
+ return $ this ;
352
+ }
353
+
354
+ /**
355
+ * @return bool
356
+ */
357
+ public function isSelected (): bool
358
+ {
359
+ return $ this ->selected ;
360
+ }
338
361
}
You can’t perform that action at this time.
0 commit comments