gijgo
gijgo copied to clipboard
getHTMLConfig bug in Grid library
Hi, I think I found a bug on the getHTMLConfig method. When I call it, it makes some changes on the columns parameter of the grid configuration and returns all the data.
Problem here is that it overwrites all the column information in the configuration of the grid, so if I call a "reload" for the grid, a lot of information that was shown dissapears, since it has been deleted when calling getHtmlConfig.
Fastest way of fixing this I found is to "clone" the config data so it won't erase the columns info, so instead of doing:
var result = gj.widget.prototype.getHTMLConfig.call(this); on the src/grid/js/grid.base.methods.js file, you can do: var result = JSON.parse(JSON.stringify(gj.widget.prototype.getHTMLConfig.call(this)));
This will make a clone of the object and won't destroy the column data.
Also, now that I see the code on the rest of your objects, I think that you may have the same problem in a couple of them...