diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue index 957095c1a2..c7170ed0de 100755 --- a/src/components/datatable/DataTable.vue +++ b/src/components/datatable/DataTable.vue @@ -1486,6 +1486,8 @@ export default { if (Object.keys(state).length) { storage.setItem(this.stateKey, JSON.stringify(state)); } + + this.$emit('state-save', state); }, restoreState() { const storage = this.getStorage(); @@ -1534,6 +1536,8 @@ export default { this.d_selectionKeys = restoredState.d_selectionKeys; this.$emit('update:selection', restoredState.selection); } + + this.$emit('state-restore', restoredState); } }, saveColumnWidths(state) { diff --git a/src/views/datatable/DataTableDoc.vue b/src/views/datatable/DataTableDoc.vue index f89f3b16bf..56dc8c9a53 100755 --- a/src/views/datatable/DataTableDoc.vue +++ b/src/views/datatable/DataTableDoc.vue @@ -2295,6 +2295,42 @@ export default { event.rows: Rows per page. Callback to invoke during virtual scrolling. + + state-save + event.first: Index of first record
+ event.rows: Number of rows to display in new page
+ event.sortField: Field to sort against
+ event.sortOrder: Sort order as integer
+ event.multiSortMeta: MultiSort metadata
+ event.filters: Collection of active filters
+ event.columWidths: Comma separated list of column widths
+ event.columnOrder: Order of the columns
+ event.expandedRows: Instances of rows in expanded state
+ event.expandedRowKeys: Keys of rows in expanded state
+ event.expandedRowGroups: Instances of row groups in expanded state
+ event.selection: Selected rows
+ event.selectionKeys: Keys of selected rows
+ + Invoked when a stateful table saves the state. + + + state-restore + event.first: Index of first record
+ event.rows: Number of rows to display in new page
+ event.sortField: Field to sort against
+ event.sortOrder: Sort order as integer
+ event.multiSortMeta: MultiSort metadata
+ event.filters: Collection of active filters
+ event.columWidths: Comma separated list of column widths
+ event.columnOrder: Order of the columns
+ event.expandedRows: Instances of rows in expanded state
+ event.expandedRowKeys: Keys of rows in expanded state
+ event.expandedRowGroups: Instances of row groups in expanded state
+ event.selection: Selected rows
+ event.selectionKeys: Keys of selected rows
+ + Invoked when a stateful table restores the state. +