Tables collapse when remove row using editor

Tables collapse when remove row using editor

saligiayyssaligiayys Posts: 12Questions: 7Answers: 0
edited November 2022 in Free community support

Hi team,

I have 7 DataTables and Editors respectively for Mon to Sun.
I uses them to add, edit and remove staff's timesheets.
Everything else is working perfectly.
But when I remove a row (especially when I quickly remove multiple rows), the 7 tables sometimes collapse, and data outside the table bound with ajax does not change.
Even if I click submit button(bound with ajax) to show the tables again, it does not work. So I have to refresh the page.
Could you please help have a look on my code? And I also suspect should I use 7 tables and editors~ but could not figure out a better solution yet. Thank you very much!

Here is the code that bound with event. I also have tried add a "remove" event and etc, but still does not work.

    editorMon
            // .on('edit', function (e, type) {}
            //.on('remove', function (e, type) {}
            .on('submitSuccess', function (e, type) {
                $.ajax({
                    async: false,
                    url: "inc/backend/data_retrieval/getTimesheetSummaryHours.php",
                    method: "POST",
                    data: {
                        selectedUser: selectedUser,
                        weekStartDay: weekStartDay,
                        weekEndDay: weekEndDay
                    },
                    success: function (data) {

                        RenderAjax(data);

                    }
                });
            })

This question has an accepted answers - jump to answer

Answers

Sign In or Register to comment.