Upgrading
Notes for Filament 5.
Pick the right branch#
TableKit has one branch per Filament version. See the README for the table. Do not mix them: each branch needs its own Filament and Livewire version.
- This branch needs Filament
^5.8.4and Livewire 4. - Filament 5.0.0, 5.5.0, 5.7.0 and 5.8.0 fail the package tests before they reach plugin code (a Livewire error-bag
TypeError), so they are excluded. - TableKit needs no Livewire 4 specific setup. The reload behavior relies on Livewire's
#[Url(keep: true)](the "always show" rule), which Livewire 4 still has with the same browser rules. - The Filament 4 and Livewire 3 version lives on the
filament-v4branch. The Filament 3 version lives onfilament-v3.
Coming from the Filament 3 version#
Saved views carry over. The stored format is the same, and newer branches convert old values when a view is applied. See Database.
- Turn on
->reorderableColumns()on tables where you want column order saved. The Filament 3 column list is replaced by Filament's own column manager. - Remap icon aliases that you changed for the Filament 3 version. The alias list changed a little. See Colors and icons. The
tablekit::quick-filters.clear,tablekit::columns.openandtablekit::columns.resetaliases are gone. - The extra-sorts URL parameter is now
sorts(it wastableSorts). - Plugin and config options are the same.
Adding presets and the view manager to an older setup#
If you started with only saved views and now add presets, the view manager or managed defaults:
- Run the new migration,
tablekit_preferences, before you deploy code that defines presets or turns on managed defaults. It follows the sametablekit.connectionrule astablekit_views(php artisan migrate --database=<connection> --path=vendor/tablekit/filament-tablekit/database/migrationsfor a pinned connection). It adds a unique index through raw SQL on Postgres and SQLite only. - If your app owns its migrations, publish with
--tag=tablekit-migrationsand copy the new file. - Remap the new icon aliases if you use another icon set. See Colors and icons.
- Components without presets behave as before and run no preferences query.
Both tables have a nullable user_type column next to user_id. It is part of the lookup and unique indexes.
Adding multi-sort, quick filters and column order#
- No migration is needed. These features extend the stored state JSON, and views saved earlier load unchanged.
- Multi-sort and column order are on for every component that uses the trait. The Sort button appears, and column order is saved in views. Turn them off globally or per table if you do not want them (see Configuration).
- Quick filters stay off until you enable them.