Reputation: 539
How to call a function after rendering Ext.view.View?
Ext.create('Ext.view.View', {
store: Ext.data.StoreManager.lookup('imagesStore'),
tpl: imageTpl,
itemSelector: 'div.thumb-wrap',
emptyText: 'No images available',
renderTo: Ext.getBody()});
Upvotes: 0
Views: 1402
Reputation: 1604
You should use the afterrender event like so:
Ext.create('Ext.view.View', {
store: Ext.data.StoreManager.lookup('imagesStore'),
tpl: imageTpl,
itemSelector: 'div.thumb-wrap',
emptyText: 'No images available',
renderTo: Ext.getBody(),
listeners: {
afterrender: function() {
// Do something here
}
}
});
You can access the documentation for that here
Upvotes: 3