avo
avo copied to clipboard
Fix action records selection when browser back is executed
Build off this because I think it's the same root cause. When I run an action after using the back button in my browser,
query.size
becomes 0 no matter how many rows I select. Steps to reproduce:
- Run action from index page, works as expected
- Click on show page for a row
- Navigate back to the index page using the back button (tested using latest version of Chrome)
- Select rows and run (any) action
- See the action query params in the url:
http://localhost:3000/path/to/resource/actions?action_id=Avo::Actions::ActionName
,query.empty? == true
.
This is a severe issue because it's causing the action to fail without warning to the user unless the action is set up to detect if the query is empty, which should never be true under normal circumstances. The only indication of failure is the url query params and the action modal not closing.
Originally posted by @nrgbistro in https://github.com/avo-hq/avo/issues/2607#issuecomment-2237137557
I guess that the browser-cached version does not include the record ids inserted by JS on each selection.