Skip to content

Avoid duplication of filters on back#2998

Merged
mshibuya merged 1 commit into
railsadminteam:masterfrom
evanboho:master
May 4, 2018
Merged

Avoid duplication of filters on back#2998
mshibuya merged 1 commit into
railsadminteam:masterfrom
evanboho:master

Conversation

@evanboho

@evanboho evanboho commented Mar 7, 2018

Copy link
Copy Markdown
Contributor

Bug: filters are duplicated when using back button
Repro steps:
Using Chrome, visit a list page, apply a filter, click into an element, click back button
Using these steps, I see a duplicated filter. RailsAdmin is appending the filters regardless
of whether or not they are there.

This fixes that by adding an id to each filter based on the name and index.
Before appending, it removes any filters with that id.

I haven't been able to figure out how to write specs for this. Any assistance would be appreciated.

Bug: filters are duplicated when using back button
Repro steps:
Using Chrome, visit a list page, apply a filter, click into an element, click back button
Using these steps, I see a duplicated filter. RailsAdmin is appending the filters regardless
of whether or not they are there.

This fixes that by adding an id to each filter based on the name and index.
Before appending, it removes any filters with that id.
@mshibuya mshibuya merged commit cb49944 into railsadminteam:master May 4, 2018
@mshibuya

mshibuya commented May 4, 2018

Copy link
Copy Markdown
Member

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants