Customization & Troubleshooting
Override storage methods, custom database storage, and fixes.
Configuration options
Override any of these methods in your class to customize behavior:
| Method | Description |
|---|---|
persistColumnWidthsToDatabase() | Customize how column widths are saved to the database |
persistColumnWidthsToSession() | Customize how column widths are saved to the session |
loadColumnWidthsFromDatabase() | Customize how column widths are loaded from the database |
loadColumnWidthsFromSession() | Customize how column widths are loaded from the session |
getUserId() | Customize how user identification is handled |
Example: custom database storage
use Asmit\ResizedColumn\HasResizableColumn;
class ListUsers extends ListRecords
{
use HasResizableColumn;
protected function persistColumnWidthsToDatabase(): void
{
YourCustomModel::updateOrCreate(
[
'user_id' => $this->getUserId(),
'resource' => $this->getResourceModelFullPath(), // e.g. 'App\Models\User'
],
['settings' => $this->columnWidths]
);
}
}
Troubleshooting
CSS styles not loading
If the resize handles don't display correctly:
- Publish the Filament assets:
Terminal
php artisan filament:assets - Clear your browser cache or hard refresh (Ctrl+F5).