ScottyG
ScottyG
FFilament
Created by ScottyG on 2/5/2025 in #❓┊help
Is it possible to use "create new option in modal" feature with polymorphic select?
I would like to use this feature https://filamentphp.com/docs/3.x/forms/fields/select#creating-a-new-option-in-a-modal with a polymorphic select. But it seems like it is not supported. Is there an alternative method, package, or workaround for this functionality?
3 replies
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