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

Removing filters re-loads other filters #38

Open
will-moore opened this issue May 14, 2018 · 1 comment
Open

Removing filters re-loads other filters #38

will-moore opened this issue May 14, 2018 · 1 comment

Comments

@will-moore
Copy link
Member

From #27 (comment)
Each time a filter is removed the key_value pairs are reloaded and UI regenerated
Example:

  • Add ROI_count
  • Add Key_value. wait for the UI to be built
  • Remove ROI_count
  • The Key_value component will be rebuilt.
@will-moore
Copy link
Member Author

will-moore commented May 14, 2018

This bug is not just for map_annotations, but will show up anytime you remove a filter (except for removing the last filter in the list).
This is because the key that tells React whether each filter is a new vv existing component is based on the name and Index.

<ParadeFilter
    key={fname + idx}

So, React will re-load filters if the index changes, which includes re-loading the filter and data from OMERO.

Kinda tricky to think how to fix that since you may have several filters with the same name e.g. Tag and a different Tag selected in each. If you remove one of them, we want React to remove just that one and not change the others. But it's hard to see how we can define a key for each filter based on the current state of each filter.

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

No branches or pull requests

1 participant