Cannot read properties of undefined (reading '_aData')
Cannot read properties of undefined (reading '_aData')
I'm using datatable with angular.
In the initial load the datatable looks fine and all the features are working with the given datatable api functions.
I'm trying to get the selected row data with tbl.row(this).data() api function - Works perfectly on the initial load. (Screenshot 1)
The problem statement starts here -
I have a Filter button (not a part of datatable) which opens a modal form with advanced filter options. (Screenshot 2)
On apply filter a new dataset returns by api and handover to datatable to repopulate. (Screenshot 2)
But here after data load if I click on a row to get the row data it thorws the exception ( Screen Shot 3)
Surprisingly If I click on 0 & 1 index rows (which were available at the initial load ) I can get the row data with no exception.
I believe somehow datatable is holding its older instance ( On load call ).
Code snippet
Any helo will be highly appreciated.
Cheers.
Replies
I don't see anything obvious in your code that would cause the problem. Please provide a link to your page or a test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
For a test case use two Javascript variables; one that represents the first dataset and the other representing the second.
Kevin