The edit functionality

We will implement the edit functionality by changing the table to editable and adding the save button to each row. The save button will invoke the function that sends the PUT request to the backend for saving the changes to the database:

  1. Add the cell renderer, which changes the table cells to editable. Open the Carlist.js file and create a new function called renderEditable. See the source code for the following function. The cell will be the div element and the contentEditable attribute makes it editable. suppressContentEditableWarning suppresses the warning that comes when the element with the child is marked to be editable. The function in onBlur is executed when the user leaves the table cell, and this is where ...

Get Hands-On Full Stack Development with Spring Boot 2.0 and React now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.