I'd like to reset the sort state of primeng datable. i am able to reset full datatable but still sort state is not reset
This worked for me:
HTML
<p-table #table ...>
TS
import {Table} from 'primeng/table';
@ViewChild('table') table: Table;
resetSort() {
this.table.sortOrder = 0;
this.table.sortField = '';
this.table.reset();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With