This repository was archived by the owner on Jun 27, 2024. It is now read-only.
This repository was archived by the owner on Jun 27, 2024. It is now read-only.
Request to add an option to "addColumn" to disable as default #14
Closed
Description
Hi,
Wondering if it would be possible to add the option to add columns, but add them disabled by default.
Would be a bonus if the state can be saved, so that when returning to the table, that the selected columns visibility is maintained.
Might be nice to extend to saving sort order etc.
/**
* Add a column to the query builder.
*
* @param string $key
* @param string $label
* @param bool $enabled
* @return self
*/
public function addColumn(string $key, string $label, bool enabled = true): self
{
$this->columns->put($key, [
'key' => $key,
'label' => $label,
'enabled' => $enabled,
]);
return $this;
}