Automatic Sum of Selected Bulk Action item column
I have a filament table that has a number of custom bulk actions to do various things to the data.
I would also like to automatically display the sum of a numeric column for all selected rows. I know that I can do this in a modal as a new action but it would be better of I could display it as a table summary so this it is display as I select the items.
Is there any way do do this?
6 Replies
Still looking for an answer for this. Is there any way to show a sum of a table column for selected rows only?
Not that I know off no... You could try some custom js to set a value based of the selected records
The bulk actions stuff is a weak spot in filament tables imo.
Lacking in customization ability I have resorted to using recordClasses to set a custom cas class for the rows and then JavaScript to update stuff.
Well you could add a isSelected helper class and do a PR for support. But we have to also be aware that filament isn't designed for Huge data changes in tables as livewire sends a lot of date back/forth in bulk actions.
Every tool has it's compromises.
I think there are a basic of issues beyond stuff that requires data back and forth via livewire with the bulk actions that I outlined in a discussion here
https://github.com/filamentphp/filament/discussions/15576
Didn't seem to be much interest. But let me review the contribution guidelines and see if I can make a PR
GitHub
Bulk actions = UI / customizability is poor esp when used with a gi...
add optional label text clickable row to select in bulk action - currently only possibly in a very hacky way (i think this is a common ui pattern so shouldn't be this hard) https://www.answerov...
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View