Skip to content

Commit d0dfeb6

Browse files
committed
Added missing $column variable
Added missing $column variable
1 parent 36d7613 commit d0dfeb6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Html/Builder.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -403,10 +403,10 @@ public function getQualifiedTitle($title)
403403
* Add a checkbox column.
404404
*
405405
* @param array $attributes
406-
* @param bool $position
406+
* @param bool|int $position true to prepend, false to append or a zero-based index for positioning
407407
* @return $this
408408
*/
409-
public function addCheckbox(array $attributes = [], bool $position = false)
409+
public function addCheckbox(array $attributes = [], $position = false)
410410
{
411411
$attributes = array_merge([
412412
'defaultContent' => '<input type="checkbox" ' . $this->html->attributes($attributes) . '/>',
@@ -419,14 +419,14 @@ public function addCheckbox(array $attributes = [], bool $position = false)
419419
'printable' => true,
420420
'width' => '10px',
421421
], $attributes);
422-
423-
if ($position === true) {
424-
$this->collection->prepend($column);
425-
} else if ($position === false || $position >= $this->collection->count()) {
426-
$this->collection->push($column);
427-
} else {
428-
$this->collection->splice($position, 0, [$column]);
429-
}
422+
$column = new Column($attributes);
423+
if ($position === true) {
424+
$this->collection->prepend($column);
425+
} else if ($position === false || $position >= $this->collection->count()) {
426+
$this->collection->push($column);
427+
} else {
428+
$this->collection->splice($position, 0, [$column]);
429+
}
430430

431431
return $this;
432432
}

0 commit comments

Comments
 (0)