events.md 4.3 KB

Events []({{ site.repo }}/blob/master/docs/_i18n/{{ site.lang }}/documentation/events.md)


Option Event jQuery Event Parameter Description
onAll all.bs.table name, args Fires when all events trigger, the parameters contains:
name: the event name,
args: the event data.
onClickRow click-row.bs.table row, $element Fires when user click a row, the parameters contains:
row: the record corresponding to the clicked row,
$element: the tr element.
onDblClickRow dbl-click-row.bs.table row, $element Fires when user click a row, the parameters contains:
row: the record corresponding to the clicked row,
$element: the tr element.
onSort sort.bs.table name, order Fires when user sort a column, the parameters contains:
name: the sort column field name
order: the sort column order.
onCheck check.bs.table row Fires when user check a row, the parameters contains:
row: the record corresponding to the clicked row.
onUncheck uncheck.bs.table row Fires when user uncheck a row, the parameters contains:
row: the record corresponding to the clicked row.
onCheckAll check-all.bs.table rows Fires when user check all rows, the parameters contains:
rows: array of records corresponding to newly checked rows.
onUncheckAll uncheck-all.bs.table rows Fires when user uncheck all rows, the parameters contains:
rows: array of records corresponding to previously checked rows.
onLoadSuccess load-success.bs.table data Fires when remote data is loaded successfully.
onLoadError load-error.bs.table status Fires when some errors occur to load remote data.
onColumnSwitch column-switch.bs.table field, checked Fires when switch the column visible.
onColumnSearch column-search.bs.table field, text Fires when search by column.
onPageChange page-change.bs.table number, size Fires when change the page number or page size.
onSearch search.bs.table text Fires when search the table.
onToggle toggle.bs.table cardView Fires when toggle the view of table.
onPreBody pre-body.bs.table data Fires before the table body is rendered
onPostBody post-body.bs.table none Fires after the table body is rendered and available in the DOM
onPostHeader post-header.bs.table none Fires after the table header is rendered and availble in the DOM