Hello,


I'm using DataTables for an application I'm working on. I have a list of records being populated inside my table records, and the DataTableJS is attached to this table. 

I have a screen-action, which on press of a button filters out some values in the table and I use AJAX refresh to refresh table data and the DataTableJS. This works well when there are more than 1 or 2 records, the styling etc is preserved. 

But when there is just one record in the filtered list of records, I get the following error in my console. Can someone help identify the root cause? 



The same table works perfectly fine when there is more than one record in the filtered list.


Thanks,

Junaid

Did some more debugging and found the root cause, was able to reproduce, but still don't have a fix. Here's my findings:

When there is just one record in the table, Outsystems does this :



And this give rise to a unformatted table, in which scenario the above errors occur in the console. Refer to this: https://stackoverflow.com/questions/25377637/datatables-cannot-read-property-mdata-of-undefined


I added a 2nd test record to the my record list if there is only one record, and it works fine. Again, this issue only happens when there is one record in the list.


Junaid

Hi Junaid,

As you already working on it , could you please share the oml just with this functionality .


Regards,

-PJ-

Pramod Jain wrote:

Hi Junaid,

As you already working on it , could you please share the oml just with this functionality .


Regards,

-PJ-

Hi Pramod, 


Attaching the test_oml i created for triage. In the preparation, enable the 2nd list_append to see how the table looks when there is no error in the console. Currently disable, and when you open it on the browser, the console has the above error.


Thanks,

Junaid