Saving reordered table in database
Saving reordered table in database
My data in database table are ordered by Position(integer) column.
My backend is Flask. Html Table is created by Jinja engine.
How to update Position in database for all rows when row in table is reordered?
I tried https://datatables.net/extensions/rowreorder/examples/initialisation/events.html
but I don't know how to send only information about reordered table by AJAX to flask endpoint. I tried diff .newPosiotion and oldPosition but it gives me only information about position in the table.
Answers
You would need a script on the server to update that column. Editor does this automatically - please see example here - so it would be worth considering that as a solution,
Colin