Require explicit opt-in for "clicking grid row checks box" feature

sometimes it makes sense *not* to enable that, in which case disabled
probably should be the default
This commit is contained in:
Lance Edgar 2021-08-23 19:26:50 -05:00
parent a881b310bc
commit 3cf4c0f8e4
3 changed files with 9 additions and 0 deletions

View file

@ -75,6 +75,7 @@ class Grid(object):
sortable=False, sorters={}, default_sortkey=None, default_sortdir='asc',
pageable=False, default_pagesize=20, default_page=1,
checkboxes=False, checked=None, check_handler=None, check_all_handler=None,
clicking_row_checks_box=False,
main_actions=[], more_actions=[], delete_speedbump=False,
ajax_data_url=None, component='tailbone-grid',
**kwargs):
@ -128,6 +129,7 @@ class Grid(object):
self.checked = lambda item: False
self.check_handler = check_handler
self.check_all_handler = check_all_handler
self.clicking_row_checks_box = clicking_row_checks_box
self.main_actions = main_actions or []
self.more_actions = more_actions or []