File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -460,9 +460,10 @@ public function getQualifiedTitle($title)
460
460
* Add a checkbox column.
461
461
*
462
462
* @param array $attributes
463
+ * @param bool $prependColumn
463
464
* @return $this
464
465
*/
465
- public function addCheckbox (array $ attributes = [])
466
+ public function addCheckbox (array $ attributes = [], bool $ prependColumn = false )
466
467
{
467
468
$ attributes = array_merge ([
468
469
'defaultContent ' => '<input type="checkbox" ' . $ this ->html ->attributes ($ attributes ) . '/> ' ,
@@ -475,7 +476,12 @@ public function addCheckbox(array $attributes = [])
475
476
'printable ' => true ,
476
477
'width ' => '10px ' ,
477
478
], $ attributes );
478
- $ this ->collection ->push (new Column ($ attributes ));
479
+
480
+ if ($ prependColumn ) {
481
+ $ this ->collection ->prepend (new Column ($ attributes ));
482
+ } else {
483
+ $ this ->collection ->push (new Column ($ attributes ));
484
+ }
479
485
480
486
return $ this ;
481
487
}
You can’t perform that action at this time.
0 commit comments