Add initial/basic support for "simple" mobile grid filter w/ radio buttons

so far only one such filter is (presumably?) supported..etc.
This commit is contained in:
Lance Edgar 2017-07-10 21:04:56 -05:00
parent 9da7ba21bf
commit f47157102c
10 changed files with 104 additions and 19 deletions

View file

@ -65,6 +65,7 @@ class MasterView(View):
supports_mobile = False
mobile_creatable = False
mobile_filterable = False
listing = False
creating = False
@ -197,11 +198,19 @@ class MasterView(View):
defaults = {
'route_prefix': self.get_route_prefix(),
'pageable': self.pageable,
'sortable': True,
'sortable': False,
'filterable': self.mobile_filterable,
}
if self.mobile_filterable:
defaults['filters'] = self.make_mobile_filters()
defaults.update(kwargs)
return defaults
def make_mobile_filters(self):
"""
Returns a set of filters for the mobile grid, if applicable.
"""
def preconfigure_mobile_grid(self, grid):
"""
Optionally perform pre-configuration for the mobile grid, to establish