DataTable Disable Sort temporarily

UI Components for Angular
Post Reply
JerryLan
Posts: 14
Joined: 22 Nov 2017, 17:17

02 Jan 2018, 23:35

I would like to disable sorting and paging if any selections are currently made on the DataTable. This will force the user to either remove the selections or push the button which acts on them. Turning off the paginator is easy with @ViewChild and this.dataTable.paginator = false;
Turning off sorting while selections are in place is not so obvious.

Thanks

JerryLan
Posts: 14
Joined: 22 Nov 2017, 17:17

02 Jan 2018, 23:43

The other possibility would be to catch the event request, warn the user and throw the event away.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

02 Mar 2018, 10:57

p-table has pSortableColumnDisabled property in upcoming 5.2.1 that can disable the sorting for header.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 13 guests