Hi,
In my application there are 2 screens: first screen with a list of plans, second screen shows the opened plans data, each in a separeted tab. In the tab itself I am using the Splitter component between two grids. I am using the vue keep-alive on the screens because I want to keep the state on each tab.
When opening a plan for the first time, it is opened in the second screen in a tab and the Splitter is properly showing the grids (screenshot 1). Now I am going back to the first screen, and opening another plan. The second plan is opened in the second screen (which is already rendered due to the keep-alive) in a new tab. Here the Splitter component is not showing the grids properly (screenshot 2).
Screenshot 1:
screenshot 2:
I followed this to define the pane content (using id): pane-content-using-selector
Hi Buvana,
Please see the attached project sample.
I created a small project example which is very similar to what I am trying to do in my project (it involves vue-router and vuex).
You will see that when you click on 'Add Tab' button, you will be routed to another screen (screen1) with the opened tab, and the splitter with the panes content are displayed properly. But when you will go back to screen2 and click again to add another tab, the new added tab contains the spliter but the panes don't show the content.
Please let me know if you need more information.
Thanks,
|
<ejs-splitter :id='`${tabName}-splitter1`' ref='splitterObj' width='600px' height='200px'>
<e-panes>
<e-pane min='60px' size ='200px'></e-pane>
<e-pane min='60px' size ='200px'></e-pane>
<e-pane min='60px' size ='200px'></e-pane>
</e-panes>
</ejs-splitter>
..
<div :id="`${tabName}-left-pane-content1`" style="display: none;">
<div>Left pane<div id='panetext'>Home Pane size: 25%</div>
<div id='panetext'>Home Pane min: 60px</div>
</div>
</div>
……
export default {
…….
props: {
tabName: String
},
mounted: function() {
this.$refs.splitterObj.ej2Instances.paneSettings[0].content = "#" + this.tabName + "-left-pane-content1";
this.$refs.splitterObj.ej2Instances.paneSettings[1].content = "#" + this.tabName + "-middle-pane-content1";
this.$refs.splitterObj.ej2Instances.paneSettings[2].content = "#" + this.tabName + "-last-pane-content1";
}
};
</script>
|
Thank you very much! It works.