I am currently working on creating a table with pagination using datatables. The data is being fetched via ajax, which returns 10 data entries at a time. However, I am facing an issue where the first call only fetches the initial 10 data from the ajax call, and subsequent clicks on the next page do not fetch additional data. It seems that datatables collects all the data upfront for its own pagination purposes. How can I resolve this issue? For example, if the ajax call returns 100 data entries from the backend, how can I ensure that datatables generates the correct number of pages (in this case, 10), and only fetches more data when the user clicks on the next button?
Any help or suggestions would be greatly appreciated.