Open VazgenGishyan opened 2 weeks ago
Hi, Did you try to import the Dashboard in the same ThingsBoard you exported the Dashboard or another one? Does the Dashboard in the first place work correctly, and is ThingsBoard version 3.8.1? Also, I wanted to ask if you use custom action or custom widgets,
Hi,
No, I imported the dashboard into another ThingsBoard. Yes, it worked correctly in the original one, which was running version 3.7.0. Additionally, I am using custom widgets.
Hello, The thing is, ThingsBoard was never able to import a dashboard with custom widgets. If you want to import the dashboard correctly, you have to import custom widgets, too, because the dashboard doesn't import custom elements when importing. This could be the root of the error.
Hi,
As far as I remember, ThingsBoard used to automatically import the required widgets along with the dashboard.
In any case, I have now manually imported all the widgets, and everything is working correctly. However, the onDestroy function is still not being called for widgets in the previous state when the state changes.
I facing same problem import custom widget from 3.8.0 to 3.7.0 and vise versa.
Hi,
I hope this helps: I found that the transition between states works correctly only for the Layout Tablet (sm) range (min 600px – max 959px).
For all other layouts, I encounter warnings.
However, if I reload the page, everything starts working normally.
Hi, The framework or environment may not automatically trigger onDestroy when widgets are replaced or state changes. ThingsBoard, for instance, may cache or reuse widget instances for efficiency, which could prevent the onDestroy method from being called as expected. Try to clear cache, please.
Hi, I have tested the issue with cleared caches and also in incognito mode, but unfortunately, I am still experiencing the same problem.
I apologize in advance for any confusion, but I think the issue may not be that onDestroy is not being called. Instead, it seems that new widgets are not being placed in the correct location. However, on the Layout sm version, or after refreshing the page, everything works as expected.
Hi, After the version update to 3.8.1, I have encountered the following issues:
When importing a new dashboard via JSON, the required widgets are no longer imported automatically.
When changing the state in the dashboard, the onDestroy function is no longer called for widgets from the previous state.