JqGrid class variable exra_config
mbanaouas opened this issue · 0 comments
mbanaouas commented
Hi all,
extra_config is a class variable, and this can lead to a bug in the case of a page containing two jqGrid objects:
gridFoo = jqGrid()
gridFoo.extra_config['editurl'] = '/foo/edit'
gridBar = jqGrid()
print gridBar.get_config() will contain {'editurl': '/foo/edit'} even it's not concerned with.
So extra_config introduced some kind of persistence across of all objects while, IMHO, it was designed to serve each object separately.
This can be solved by making it an instance variable:
class JqGrid(object):
def init(self):
self.extra_config = {}