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

Dashboard re-creates widgets when edit mode changed #28

Open
ghost opened this issue Jul 21, 2017 · 2 comments
Open

Dashboard re-creates widgets when edit mode changed #28

ghost opened this issue Jul 21, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 21, 2017

Just checking if this is the supposed behavior: when the dashboard goes to edit mode, the widgets are re-created.

Is there a way to prevent the Dashboard column components from re-creating their widget components?

Many thanks.

@Raathigesh
Copy link
Owner

Unfortunately, it's not possible with the current implementation. The component constructor is provided and then the components are created depending on the layout provided. This could be a problem for certain use-cases.

What exactly the issue you are experiencing due to this behavior?

@ghost
Copy link
Author

ghost commented Jul 24, 2017

Hi @Raathigesh thanks for the quick answer.

The problem was with a component that I have that contains a canvas with a chart. The canvas is redrawn every-time the dashboard goes into edit mode. Loosing all data points in the process.

The workaround I implemented was: before toggling the dashboard's edit mode I store a backup of the chart's data points and, since my widgets have the ref of the dashboard parent component, they will query the parent to check if there is any backup data points to plot.

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

No branches or pull requests

1 participant