extjs 3 - 卡片布局在 tabpanel 中不起作用
我正在使用带有卡片布局的选项卡面板。当我第一次打开选项卡时,一切正常。但是当我关闭(隐藏)选项卡然后重新打开它时,我无法再在卡片之间导航
// Hide tab
tab.hide();
tabpanel.hideTabStripItem(tab);
// Reopen tab
tabpanel.unhideTabStripItem('mytab');
tabpanel.setActiveTab('mytab');
// Panel = objPanel
{
xtype: 'panel',
layout: 'card',
layoutConfig: {
deferredRender: true
},
activeItem: 0,
border: false,
plain: true,
items: [
...
]
}
// Switching between cards
objPanel.getLayout().setActiveItem(0); // or 1
事情是 objPanel.getLayout() 在重新打开选项卡而不是对象后给出“卡片”(字符串)。
谁能为此提出任何解决方案?感谢您的任何帮助。
I am using tabpanel with card layout. When i open the tab for the first time everything works fine. but when i close (hide) the tab and then reopen it then i can no longer navigate between cards
// Hide tab
tab.hide();
tabpanel.hideTabStripItem(tab);
// Reopen tab
tabpanel.unhideTabStripItem('mytab');
tabpanel.setActiveTab('mytab');
// Panel = objPanel
{
xtype: 'panel',
layout: 'card',
layoutConfig: {
deferredRender: true
},
activeItem: 0,
border: false,
plain: true,
items: [
...
]
}
// Switching between cards
objPanel.getLayout().setActiveItem(0); // or 1
The thing is objPanel.getLayout() gives "card" (string) after reopening the tab instead of an object.
Can anyone suggest any solution for this? Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定是什么导致了这个问题,但是当我将 dataview 更改为 gridpanel 时,一切正常。
以下是我的布局 - 当我无法重新打开选项卡时:
新布局 - 我可以在其中重新打开选项卡:
I am not sure what causes this problem but when i changed dataview to gridpanel, everything is working fine.
Following is how my layout was - when i wasn't able to reopen a tab:
New layout - where i am able to reopen the tab: