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
You should be able to clear the filters by triggering: resetTableFiltersForm
I don't want to clear the filters though. I want to clear the selected items.
are you using an IDE? There is a method you can call
->deselectRecordsAfterCompletion()
That works. Not sure why I missed that one. Thanks! π
No problem!