Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix action records selection when browser back is executed #3029

Open
Paul-Bob opened this issue Jul 19, 2024 · 0 comments
Open

Fix action records selection when browser back is executed #3029

Paul-Bob opened this issue Jul 19, 2024 · 0 comments

Comments

@Paul-Bob
Copy link
Contributor

Paul-Bob commented Jul 19, 2024

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:

  1. Run action from index page, works as expected
  2. Click on show page for a row
  3. Navigate back to the index page using the back button (tested using latest version of Chrome)
  4. Select rows and run (any) action
  5. 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 #2607 (comment)

I guess that the browser-cached version does not include the record ids inserted by JS on each selection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Do
Development

No branches or pull requests

1 participant