Recently I was editing my Complete Singapore-Indonesia Ferry Schedule JSON data when I encountered a bug. I was editing an array of objects which is the property value of the parent JSON object. In JSON Table Editor terms, this means I am operating on a child window. Tired of scrolling ups and downs, I filtered the rows. I then edit some of the rows, then confirmed my changes.
But when I clicked
After few rounds of trial and error trying to solve this bug, this is my final solution:
// checkedOpener = true if it's a child window // grid = Ext.grid.Panel instance if (checkedOpener && grid.filters.getFilterData().length>0) { // innerOutput = function to either output the grid's data into // JSON output or updating parent JSON field value grid.on('filterchange', innerOutput); grid.filters.clearFilters(); } else innerOutput();
That’s all folks. Cheers!
loading...
About Hardono
Incoming Search
bugs, extjs, javascript, json