Hi myself stuck with a part of my project. I have created the table in react and had fetched the api to show the data of the cells. But when i double click the table cell it should able to edit the data and if changes made it should be saved and updated to the database. I am not sure about the update function and how to edit the table cell on doubleClick. Please help me out to do this. I'll share my some of the codes.
<tr>
<th>
<div className="td1">Concept</div>
</th>
{data.Concept.map((item, i) => {
return (
<td {"This cell needed to be edited on doubleClick"}>
<div className="mx-3 td2" key={i}>
{item ? item : "-"}
</div>
</td>
);
})}
<td className="td1">
<div className="">
<button
{'This is the save button that should update the value to the database"}
type="button"
className="btn btn-warning p-2 td1 border "
>
<i className="bi bi-arrow-repeat"></i>
</button>
</div>
</td>
</tr>