Set filter value renderer when setting enum for grid field

This commit is contained in:
Lance Edgar 2018-06-05 14:38:52 -05:00
parent 3688979b8f
commit ae3f79e522

View file

@ -206,6 +206,8 @@ class Grid(object):
if enum:
self.enums[key] = enum
self.set_type(key, 'enum')
if key in self.filters:
self.filters[key].set_value_renderer(gridfilters.EnumValueRenderer(enum))
else:
self.enums.pop(key, None)