1

My app uses Deft to inject stores. However, when I try to inject a store into a pagingtoolbar at the bottom of a grid panel, it does not work.

Ext.define("My.grid.Panel", {
    ...
    inject: {
        store: 'myStore' // works fine
    },
    ...
    dockedItems:[{
        xtype: 'pagingtoolbar',
        ...
        inject: {
            store: 'myStore' // does not work
        }
    ]
}

My current workaround is adding this to the panel:

listeners: {
    afterrender: function(panel) {
        let toolbar = panel.down('pagingtoolbar');
        if (toolbar) {
            toolbar.setStore(panel.getStore());
        }
    }
}
anonymouse
  • 639
  • 1
  • 8
  • 18

1 Answers1

0

We ended up just creating a separate class that extended PagingToolbar. This solved the problem as Deft was then able to inject into it.

anonymouse
  • 639
  • 1
  • 8
  • 18