Search code examples
reactjshtml-tabledrag-and-dropreact-table-v7

Make changes in the database by drag and drop in react table


I want to make some changes in the database by drag and drop in the user interface. Actually the data is displayed in tables. the single row has an attribute called priority and the table is ordered according to the priority. now by dragging and dropping the row i have to change the priority. priority swapping function in api is already completed. how can i make drag and drop ,send the data to the back end


Solution

  • You can use react-beautiful-dnd library that provides easy implementation of drag and drop feature in tables.

    After the user drag and drops a table row it returns the modified rows according to position that you can send to backend.