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

Cleaning Dataset State in dataset-details-dashboard #1617

Open
sofyalaski opened this issue Oct 18, 2024 · 0 comments
Open

Cleaning Dataset State in dataset-details-dashboard #1617

sofyalaski opened this issue Oct 18, 2024 · 0 comments

Comments

@sofyalaski
Copy link

Issue Name

Is cleaning Dataset State in dataset-details-dashboard.component.ts necessary?

Summary

I am creating a new component on top of the existing dataset model for Swiss OpenEm project. I want to be routed there from the /datasets/:id and I implemented a button that routes my new component (to /datasets:id/mycomp)in the datasets-details. My component needs the information about this dataset. As I understand, /dataset/:id view in the frontend consists of two components: the datasets-details-dashboard which is followed by datasets-details. In the former, commands are implemented to clear the state of Dataset, Sample, and Proposal, like this in the ngOnDestroy():
this.store.dispatch(clearCurrentDatasetStateAction());.
When my button is rerouting me this is triggered so I lose information about my Dataset.
Is there any specific reason why we need to clear these states? I looked through the frontend repo and other components don't do anything like that. Also, I don't understand why we clear the states of Samples and Proposals when they have a separate dashboard component.
I would appreciate any input!

Steps to Reproduce

adding a route to somewhere like /datasets/:id/route

Current Behaviour

No information about dataset with that PID

Expected Behaviour

keeping the Dataset information

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

1 participant