How to reset DataTable to first page. #3377
-
My question is similar, but not quite like this : https://github.com/orgs/primefaces/discussions/1530 My page loads data and a Select filters this data. Only after a filter is selected the data show in the DataTable. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Soved this by adding a firstRow variable and setting this to the DataTable first property. Then capturing the @page event and getting the current first row value from the event. <Datatable :first="firstRow" @page="$_onPagination"> $_onPagination(event) { Now we can update firstRow at wish . |
Beta Was this translation helpful? Give feedback.
Soved this by adding a firstRow variable and setting this to the DataTable first property. Then capturing the @page event and getting the current first row value from the event.
<Datatable :first="firstRow" @page="$_onPagination">
$_onPagination(event) {
this.firstRow=event.first;
}
Now we can update firstRow at wish .