ToggleColumn Action
I have a ToggleColumn on my table that updates the pinned status of news posts. However, I want to limit the number of pinned posts to three, so I have disabled the toggle when the post count is equal to or greater than three.
To ensure that the toggle behaves as intended, I am using the ->action() function. However, it does not seem to be working correctly. I need to investigate this further.
Another issue I have noticed is that when I update the toggle status of a post, the other records in the table do not update (i.e., disable) automatically. Instead, I need to manually refresh the page. I would like to understand why this is happening and find a solution to make the updates happen automatically.
5 Replies
Is this possible?
What about a single action?
https://filamentphp.com/docs/2.x/tables/actions#single-actions
Filament
Actions - Table Builder - Filament
The elegant TALL stack table builder for Laravel artisans.
It works using single action, so not possible to override ToggleColumn?
I'm not sure, but I would use a single action.
You can also do it:
Thanks, it works using single action.