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

Tables jump around when adding categories to fields. #1436

Closed
mfbrown opened this issue Oct 13, 2022 · 1 comment · Fixed by #1511
Closed

Tables jump around when adding categories to fields. #1436

mfbrown opened this issue Oct 13, 2022 · 1 comment · Fixed by #1511
Assignees
Labels
bug Something isn't working

Comments

@mfbrown
Copy link

mfbrown commented Oct 13, 2022

Field Request: https://ethyca.atlassian.net/jira/servicedesk/projects/FIDES/queues/custom/46/FIDES-82

Bug Description

When you add a data category on a field which is in a dataset in a collection other than the first collection of a system, then on save, the table jumps back to the first collection, without updating the dropdown.

Load a dataset with multiple collections (see attached zip)

Steps to Reproduce

  1. Load the attached dataset
  2. Load the collection: cls_classification_detail
  3. Modify the data category on a field
  4. Save

You'll see the table jump around

Expected behavior

The table should continue to show the collection that was just edited.

Screenshots

Image

Environment

Additional context

Add any other context about the problem here.
dataset.yml.zip

@mfbrown mfbrown added the bug Something isn't working label Oct 13, 2022
@nicolas-ethyca
Copy link
Contributor

nicolas-ethyca commented Oct 20, 2022

In the useEffect, it looks like its firing on dispatch, maybe make this a useState with default 0? Could totally be off and eyeballing this wrong

dispatch(setActiveCollectionIndex(0));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants