protonemedia / inertiajs-tables-laravel-query-builder

Inertia.js Tables for Laravel Query Builder
https://protone.media/en/blog/introducing-inertiajs-tables-a-datatables-like-package-for-laravel-query-builder
MIT License
438 stars 123 forks source link

Issue with addColumn method (default false) #62

Closed mazzol80 closed 2 years ago

mazzol80 commented 2 years ago

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?

kabelo2ka commented 2 years ago

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

$columns = collect(request('columns'));
...
$table->addColumn('address', 'Address', $columns->contains('address'))
pascalbaljet commented 2 years ago

Fixed in v2