Replies: 1 comment 1 reply
-
Hi, can you provide a small reproducible repo to investigate this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a function generateData(), which will generate the data for table oninit, i want to rerender the table and run the function again and apply the new data generated to the table. I tried rerender in the page but not working,
this is how i generate data in function and trigger
this.tempSlotData.forEach((slot: any) => { const d = new Date(slot.date); const day = d.toISOString().split('T')[0]; const data = { slot_id: slot._id, rev: slot._rev, date: day, token: slot.token_number, fullname: slot.user_name, phone: slot.user_phone, email: slot.user_email, time: slot.slot, lane: slot.lane_name, lane_id: slot.lane_id, group: slot.group_name, group_id: slot.group_id, status: slot.booking_status, additional_details: slot.additional_details }; this.allSlotData.push(data); }); this.dtTrigger.next(this.allSlotData);
and this is how i rerender the data
this.dtElement.dtInstance.then((dtInstance: DataTables.Api) => { // Destroy the table first dtInstance.destroy(); // this.generateSlotData(this.provider) // Call the dtTrigger to rerender again this.dtTrigger.next(this.allSlotData); });
this will rerender the same data with local updates only, how do I rerender the table with the new set of data with the data generating function?
Beta Was this translation helpful? Give feedback.
All reactions