DataTables only works on first batch of daata

DataTables only works on first batch of daata

matthewbroderickmatthewbroderick Posts: 1Questions: 1Answers: 0

I am using DataTables in an Angular app. When the data is first fetched, DataTables works fine -- styling, searching, and sorting. However, when new data is fetched, DataTables styling etc. disappears -- it seems DataTables is only aware of the first 20 rows that were fetched on the first call. Is there a way to refresh DataTables with every API call?

Answers

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736
    edited June 2022

    However, when new data is fetched, DataTables styling etc. disappears

    I would start by looking at the browser's console for errors.

    Is there a way to refresh DataTables with every API call?

    Guessing you have enabled server side processing. Server side processing automatically updates the table for each ajax request. Can you post 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

    Kevin

Sign In or Register to comment.