ScottyG
ScottyG
FFilament
Created by ScottyG on 6/24/2024 in #❓┊help
Toggle column is not updating until page refresh
ToggleIconColumn::make('favorite')
->onIcon('heroicon-s-star')
->offIcon('heroicon-o-star')
->updateStateUsing(fn (ResourceModel $record) => $record->isFavorite() ? $record->unsetFavorite() : $record->setFavorite())
->getStateUsing(fn (ResourceModel $record) => $record->isFavorite())
ToggleIconColumn::make('favorite')
->onIcon('heroicon-s-star')
->offIcon('heroicon-o-star')
->updateStateUsing(fn (ResourceModel $record) => $record->isFavorite() ? $record->unsetFavorite() : $record->setFavorite())
->getStateUsing(fn (ResourceModel $record) => $record->isFavorite())
The code updates the database properly but does not show the change in the table until the page is refreshed. (favorite is determined from a resource_user pivot table)
2 replies
FFilament
Created by ScottyG on 12/12/2023 in #❓┊help
Enable automatic ChartJS colors for Chart Widget
How can I enable the default ChartJS functionality when multiple datasets are added? I would like each dataset to be a different color without specifying it.
2 replies