fiduswriter / simple-datatables

DataTables but in TypeScript transpiled to Vanilla JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

undefined is not an object (evaluating 't.map')

HastaLaVi2 opened this issue · comments

I am using simple-datatables as a product list viewer in my project. But when the tab is left open, I written a code that will update the table every few minutes, so that if new products are in the database, they should be added to the table.

Basically what I do:

const interval = setInterval(getRequests, 60000);

In getRequests function I remove all rows with dataTable.rows.remove, and put new data from database with dataTable.insert.

This works fine. But if the user written anything in the searchbar, and then the update function runs, this error appears:

undefined is not an object (evaluating 't.map')

And, the table loads, but any of the functions does not work. Sorting, searching etc... I do not know what to do.