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

Browser Back Button will duplicate Multiselection Fields #3211

Closed
OliverMannhart opened this issue Oct 17, 2019 · 0 comments
Closed

Browser Back Button will duplicate Multiselection Fields #3211

OliverMannhart opened this issue Oct 17, 2019 · 0 comments
Milestone

Comments

@OliverMannhart
Copy link

To reproduc just create following example app:

rails new test_app

add rails admin to gem file and run installer

rails g model Team name:string
rails g model Player team:references
rails db:migrate

add "has_many :players" to the model Team

start the rails app

After the rails app is created and running, do following:

go to http://localhost:3000/admin/
got to Teams
got to Add New (don't save anything)
leave fields empty, just click on Export or List

Use the browser back-button. You will get back to the Teams-Detail-View. But now the Players Selection is duplicated.
You can repeat this (browser forward, browser back) and it will keep adding new Player Selections. After a page refresh, they are gone.
Looks like there is a problem with the javascript which builds the selection.

Hope this helps to fix the issue.

But otherwise great gem!

@mshibuya mshibuya added this to the 3.0.0 milestone Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants