Use "known" label if possible when making new grid filters
This commit is contained in:
parent
7c46f10dd1
commit
8428790001
|
@ -159,6 +159,8 @@ class Grid(object):
|
||||||
if len(args) == 1 and args[0] is None:
|
if len(args) == 1 and args[0] is None:
|
||||||
self.remove_filter(key)
|
self.remove_filter(key)
|
||||||
else:
|
else:
|
||||||
|
if 'label' not in kwargs and key in self.labels:
|
||||||
|
kwargs['label'] = self.labels[key]
|
||||||
self.filters[key] = self.make_filter(key, *args, **kwargs)
|
self.filters[key] = self.make_filter(key, *args, **kwargs)
|
||||||
|
|
||||||
def remove_filter(self, key):
|
def remove_filter(self, key):
|
||||||
|
|
Loading…
Reference in a new issue