Improve checkbox click handling support for grids
i.e. let custom use define click handlers
This commit is contained in:
parent
a857d31776
commit
bcfb4f257d
5 changed files with 96 additions and 10 deletions
|
@ -131,7 +131,15 @@
|
|||
:row-class="getRowClass"
|
||||
|
||||
:checkable="checkable"
|
||||
% if grid.checkboxes:
|
||||
:checked-rows.sync="checkedRows"
|
||||
% endif
|
||||
% if grid.check_handler:
|
||||
@check="${grid.check_handler}"
|
||||
% endif
|
||||
% if grid.check_all_handler:
|
||||
@check-all="${grid.check_all_handler}"
|
||||
% endif
|
||||
## TODO: definitely will be wanting this...
|
||||
## :is-row-checkable=""
|
||||
|
||||
|
@ -228,18 +236,20 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
|
||||
let TailboneGridCurrentData = ${json.dumps(grid_data['data'])|n}
|
||||
|
||||
let TailboneGridData = {
|
||||
loading: false,
|
||||
checkedRows: [],
|
||||
selectedFilter: null,
|
||||
ajaxDataUrl: ${json.dumps(grid.ajax_data_url)|n},
|
||||
|
||||
data: ${json.dumps(grid_data['data'])|n},
|
||||
data: TailboneGridCurrentData,
|
||||
rowStatusMap: ${json.dumps(grid_data['row_status_map'])|n},
|
||||
|
||||
checkable: ${json.dumps(grid.checkboxes)|n},
|
||||
## TODO: should be dumping json from server here?
|
||||
## checkedRows: [],
|
||||
% if grid.checkboxes:
|
||||
checkedRows: ${grid_data['checked_rows_code']|n},
|
||||
% endif
|
||||
|
||||
paginated: ${json.dumps(grid.pageable)|n},
|
||||
total: ${len(grid_data['data']) if static_data else grid_data['total_items']},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue