Table sometimes reports empty, sometimes not

Table sometimes reports empty, sometimes not

jnedzeljnedzel Posts: 28Questions: 4Answers: 0

I have a table that sometimes reports empty, but other times not, even though the data going to the table is the same each time. I'm hoping that someone can suggest a way to debug this problem.

You can see the table in action here: https://gtexportal.org/home/gene/ACTN3#ieQTLBlock

The problematic table is the ieQTL table (second from the bottom of the page). Sometimes the table reports empty, sometimes it doesn't. I check for empty with this code:

$(oTable).find(".dataTables_empty").html('No ieQTL data found.');

The table is defined in webpack://.src/mixins/QtlTableMaker.js in function generateIEqtlTable()

I can't understand why the table sometimes displays correctly, then I reload the page and it doesn't.

Answers

  • kthorngrenkthorngren Posts: 21,327Questions: 26Answers: 4,949

    I put a couple break points in and found that you are calling that function twice:

    Sometimes the first time the variable ieqtls is undefined and the second time it will have an array of 39 elements. In the case of the Screenshot where the table showed no entires the first time through ieqtls had 39 array elements and the second, as shown, it is undefined.

    Not sure why you are calling the function twice nor where that data is collected and why sometimes it is undefined and other times it is an array with elements. That is outside of Datatables and has to do with the logic of your application. You will need to debug the portion of your app the fetches that data.

    Kevin

  • jnedzeljnedzel Posts: 28Questions: 4Answers: 0

    Thanks. I'll take another look at that.

This discussion has been closed.