Skip to content

Browser Back Button will duplicate Multiselection Fields #3211

@OliverMannhart

Description

@OliverMannhart

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions