According to the Datatables specs, I can add a unique ID to every row in my table:
$('#myTable').DataTable( { ajax: '/api/staff', rowId: 'staffId' } ); However, the same spec says that IDs cannot start with a number. staffIdin my case is a number, I tried to add some prefix to it:
$('#myTable').DataTable( { ajax: '/api/staff', rowId: 'id_' + 'staffId' } ); However, this didn't work. Any ideas?
'staffId'is a string in your code.IDattribute should not start with Numbers as per the docs.. You need to define Not working!