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 124 forks source link

[DRAFT] Allow columns to be disabled by default. #10

Closed neilgilmour closed 3 years ago

neilgilmour commented 3 years ago

This PR updates the addColumn() method to allow the third parameter in the column object- whether it is enabled or not. Currently this is always set to true, but in some cases you may wish to have some columns set to false. This means they will be toggleable, but will initially be toggled off, or hidden.

I thought it was reasonable to only do this on the addColumn() method and not also on addColumns().

neilgilmour commented 3 years ago

This needs a bit more work - on the front end even though columns are hidden on page load, they can't be toggled to show.