F
Filamentβ€’2y ago
nielsdscrd

Items remain selected when filtered

In short: Items which I do not see, and may not remember to be selected, are included when I run a BulkAction. Long version: I use a table with incoming items that I filter on whether I have processed the item or not. Typically only unprocessed items are shown. Various BulkActions allow me to process items in different ways. When I select a few items and run a BulkAction, these items will disappear from the list, as they are now considered processed by the filter. When I then select a few other items, and apply a different BulkAction, the originally selected items are included too, as they are still selected, even though I don't see them anymore. IMHO this is pretty unintuitive. Is there a way to always de-select filtered items? Or to reset the selection after running a BulkAction?
5 Replies
toeknee
toekneeβ€’2y ago
You should be able to clear the filters by triggering: resetTableFiltersForm
nielsdscrd
nielsdscrdOPβ€’2y ago
I don't want to clear the filters though. I want to clear the selected items.
toeknee
toekneeβ€’2y ago
are you using an IDE? There is a method you can call ->deselectRecordsAfterCompletion()
nielsdscrd
nielsdscrdOPβ€’2y ago
That works. Not sure why I missed that one. Thanks! πŸ‘
toeknee
toekneeβ€’2y ago
No problem!
Want results from more Discord servers?
Add your server