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

Fix dashboard tabs showing wrong variables #110

Merged
merged 1 commit into from
Aug 13, 2021
Merged

Conversation

ricoberger
Copy link
Member

Until now it was possible that a dashboard shows the wrong variables /
the variables from another dashboard. This could happen when the user
selected a dashboard with a larger index before another dashboard and
then switched to a dashboard with a lower index.

To fix this issue we do not use the mountOnEnter property from the Tabs
component anymore. Instead we render all dashboards when the Dashboards
component is rendered. To not load all the data for all dashboards we
are passing the activeKey and eventKey from the Tabs component to the
Dashboard component and only load the variables, when the activeKey is
equal the eventKey.

Until now it was possible that a dashboard shows the wrong variables /
the variables from another dashboard. This could happen when the user
selected a dashboard with a larger index before another dashboard and
then switched to a dashboard with a lower index.

To fix this issue we do not use the mountOnEnter property from the Tabs
component anymore. Instead we render all dashboards when the Dashboards
component is rendered. To not load all the data for all dashboards we
are passing the activeKey and eventKey from the Tabs component to the
Dashboard component and only load the variables, when the activeKey is
equal the eventKey.
@ricoberger ricoberger merged commit 51a5445 into main Aug 13, 2021
@ricoberger ricoberger deleted the fix-dashboard-tabs branch August 13, 2021 19:43
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.

1 participant