Add Grid.remove_filter()
method
This commit is contained in:
parent
908ca52b08
commit
587871e87c
|
@ -129,10 +129,13 @@ class Grid(object):
|
||||||
|
|
||||||
def set_filter(self, key, *args, **kwargs):
|
def set_filter(self, key, *args, **kwargs):
|
||||||
if len(args) == 1 and args[0] is None:
|
if len(args) == 1 and args[0] is None:
|
||||||
self.filters.pop(key, None)
|
self.remove_filter(key)
|
||||||
else:
|
else:
|
||||||
self.filters[key] = self.make_filter(key, *args, **kwargs)
|
self.filters[key] = self.make_filter(key, *args, **kwargs)
|
||||||
|
|
||||||
|
def remove_filter(self, key):
|
||||||
|
self.filters.pop(key, None)
|
||||||
|
|
||||||
def set_label(self, key, label):
|
def set_label(self, key, label):
|
||||||
self.labels[key] = label
|
self.labels[key] = label
|
||||||
if key in self.filters:
|
if key in self.filters:
|
||||||
|
|
Loading…
Reference in a new issue