- Home
- Forum
- React - EJ 2
- The panels will collapse when the data is refresh
The panels will collapse when the data is refresh
Hi, I am developing an application that using the dashboard component inside the tab component. When I choose the new data source for the dashboard component, all the panels will collapse, and the chart inside the panel will also become weird. For example,
Before choose new data source:
Tab 1:
Tab2:
After choose new data source:
Tab1:
Tab 2:
I try to make the same issues in the below link. The steps to make the issues:
- You need to drag the splitter first
- Go to tab 2 and click the 'ChangeDataSouece' button
- Go to tab 1, the chart will not in the dashboard
https://stackblitz.com/edit/react-rucgsc-j7byou?file=index.js
|
return (
<div
className="template"
style={{
height: '100%',
width: '100%',
}}>
<HeatMapComponent
id="heatmap-container"
style={{
height: '100%',
width: '100%',
}} |
|
function selected(args) {
var heatmap = document.getElementById('heatmap-container').ej2_instances[0];
heatmap.refresh();
} |
I try to set the height and width of both component and parent container as 100%, but the panels is still overlapping.Probably because I used the sidebar component with the dashboard component, so it will always have this issues.
The steps to make this issues:
- Go to Tab2
- Back to Tab1
- Change the data source
- Drag the splitter
And I can avoid the content shrinking issue by updating the component in Tab selected event. Thank you so much!!
Actually, in my project, the both tabs have the dashboard layout. So it may have more problems. But I just solve it by refreshing the dashboard layout. Thank you for your helping
- 7 Replies
- 3 Participants
-
YV Yvonne
- Dec 31, 2021 03:43 AM UTC
- Jan 11, 2022 05:50 AM UTC