protonemedia/inertiajs-tables-laravel-query-builder

Issue with addColumn method (default false)

mazzol80 opened this issue · 2 comments

When i use addColumn with default = false, initial table setup is correct, but, if i try to toggle up that column, button stops working without displaying the new column.
If i set default = true the button works as usual.
Nobody else encountered this problem?

@mazzol80 A workaround is setting the default dynamically.
For example:

$columns = collect(request('columns'));
...
$table->addColumn('address', 'Address', $columns->contains('address'))

Fixed in v2