So if the user types in a search it all works grand.
But any suggestions on how to make a CMP grid load with a custom search already dialed in from a GET paramater?
I can add
Ext.onReady(function() {
MODx.load({ xtype: 'whisky-page-expression'});
var ele = document.getElementById('expressions-search-filter');
ele.value="cat";
});
Which sets a value in the field, but doesn't trigger a search.
I also looked at the search function, and it looks as if I could do something like this?
Ext.onReady(function() {
MODx.load({ xtype: 'whisky-page-expression'});
var ele = document.getElementById('expressions-search-filter');
ele.value="cat";
var grid = Ext.get instanciation of grid JS object here
var s = grid.getStore();
s.baseParams.query = "cat";
grid.getBottomToolbar().changePage(1);
grid.refresh();
});
I tried several things with Ext.query() but I couldn't work out how to get the right object.
Thanks for any pointers!