Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In Ext it is possible to overload a component like Ext.toolbar.Paging with your own custom version. Simply specify an alias in your definition and you can us it just like the "native control."</p> <p>In order to be sure that the approach would work, I set up a test project with a simple datasource and implemented enough of a replacement definition that I could see the "Ext.toolbar.Paging".getPagingItems method being fired in my custom definition.</p> <p>From that point you can replace the code inside the definition of the original method to allow for a custom minimum in addition to the opportunity to overload the "updateInfo" method to make sure that during data reloads you're not plowing through your customizations.</p> <p>In addition to these two things, you should (with a relatively small amount of effort) be able to implement on top of the control to support dynamically changing it's values based on the contents of your grid.</p> <p>If you look at the documentation for ux.data.PagingStore you should be able to suss out the differences in using a remotely supplied store from something that is served with data locally.</p> <p>Hope this helps you.</p> <p>Code Sample:</p> <pre><code>Ext.define( "Test.view.testview.TvPageBar", { extend: "Ext.toolbar.Paging", alias: "widget.tvpagebar", title: "Bob", strictInit: function () { "use strict"; console.log("TvPageBar init"); }, getPagingItems: function () { console.log("getPagingItems", this); this.callParent(arguments); }, initComponent: function () { this.strictInit(); this.callParent(arguments); } } ); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload