找不到答案(
Ext.define('Cabinet.view.main.Main', {
extend: 'Ext.Container',
...
items: [
{
xtype: 'toolbar',
docked: 'top',
title: 'Sliding Menu',
items: [
{
xtype: 'button',
id: 'listButton',
iconCls: 'x-fa fa-bars',//list //x-fa fa-mortar-board
ui: 'plain',
listeners : {
tap: 'OnToggle'
}
}
]
},
{
xtype: 'container',
flex: 1,
itemId: 'contentPanel',
reference: 'mainCardPanel',
scrollable: 'y',
layoutConfig:{layoutOnCardChange:true},
layout: {
type: 'card',
anchor: '100%'
}
}
],
,
initialize: function(){
Ext.Viewport.setMenu(this.createMenu(),{
side: 'left',
reveal: true
});
this.callParent();
},
createMenu: function(){
var menu = Ext.create('Ext.Menu', {
width: 250,
defaultListenerScope: true,
scrollable: 'vertical',
controller: 'main',
ViewModel :
{
},
items: [
{
xtype: 'button',
text: 'asd',
viewName: 'acadPerf',
controller: 'main',
listeners : {
tap: function ()
{
if (Ext.Viewport.down('#contentPanel').getActiveItem() != 0) {
Ext.Viewport.down('#contentPanel').getActiveItem().destroy();
}
newView = Ext.create({xtype: this.viewName});
Ext.suspendLayouts();
Ext.Viewport.down('#contentPanel').setActiveItem(newView);
Ext.resumeLayouts(true);
load store
Ext.define('Cabinet.view.charts.acadPerf', {
extend: 'Ext.container.Container',
xtype: 'acadPerf',
viewModel: {
// type: 'charts'
},
layout: 'fit', //responsivecolumn
defaults: {
defaults: {
animation : !Ext.isIE9m && Ext.os.is.Desktop
}
},
listeners: {
render: function () {
this.down('grid').getStore().reload();
}
},
items: [
{
xtype: 'panel',
cls: 'faq-left-sidebar shadow',
header: false,
ui: 'light',
layout: 'fit',
responsiveConfig: {
'width < 1000': {
width: 0,
visible: false
},
'width >= 1000 && width < 1600': {
width: 230,
visible: true
},
'width >= 1600': {
width: 300,
visible: true
}
},
items: [
{
xtype:'grid',
reference: 'mainCardPanel',
store: 'acadPerfStore',
hideHeaders: true,
columns: [
{
text: 'asd',
xtype: 'gridcolumn',
flex: 1,
dataIndex: 'CONTROL_FORM',
cell: {
encodeHtml: false
},
renderer: 'renderTitleColumnAcademPerf'
},
]
}
]
}
],
...
当我第一次单击以显示菜单,然后点击第一个按钮-一切正常。 渲染器工作。我看到了所有记录。
但是当我再次单击以显示菜单并单击第一个按钮时-我只看到存储中一条记录的内容。但是网格的垂直滚动的大小就像呈现的所有记录一样。在html中,我只看到一条记录。
怎么了?