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
Dave2084
Dave2084OP2mo ago
Still looking for an answer for this. Is there any way to show a sum of a table column for selected rows only?
toeknee
toeknee2mo ago
Not that I know off no... You could try some custom js to set a value based of the selected records
Dhru
Dhru2mo ago
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.
toeknee
toeknee2mo ago
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.
Dhru
Dhru2mo ago
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
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?