Extjs 4.1 分页栏(Ext.toolbar.Paging)溢出问题

问题描述 投票:0回答:1

我正在使用 Ext.toolbar.Paging 作为网格面板。当调整面板大小时,溢出菜单出现在分页栏上。但总计数显示不正确。请检查我的寻呼栏。

pageSizingCombo是使用组合框更改分页大小的定义对象:

Ext.create('Ext.toolbar.Paging',{ store:store, dock : 'bottom', itemId:'paging-bar-view-panel', displayMsg: '{0} - {1} of {2}', items:{ xtype : 'pageSizingCombo', pageSizes : [10,20,25,50,75,100], width : 50 }, displayInfo: true, enableOverflow: true })

没有溢出菜单的分页栏。

enter image description here

带有溢出菜单的分页栏

when overflowing total count is incorrect it is displayed as

显示“

未找到记录”。这个问题有什么解决办法吗?

extjs pagination overflow toolbar extjs4.1
1个回答
2
投票
据我所知,问题在于添加到分页工具栏的 tbtext 组件:

http://docs.sencha.com/ext-js/4-1/source/Paging.html#Ext-toolbar -分页方法-initComponent。要解决此问题,您可以通过以下方式将 displayInfo 设置关闭为 false:

displayInfo: false

然后将您的项目配置调整为:

items:[{ xtype : 'pageSizingCombo', pageSizes : [10,20,25,50,75,100], width : 50 }, '->', { xtype: 'text', itemId: 'displayItem' }]

请注意,如果您更改文本组件的 itemId 值,这将不起作用。换句话说,它始终必须是“displayItem”。

© www.soinside.com 2019 - 2024. All rights reserved.