Open utterances-bot opened 3 years ago
Found it helpful, Thanks!
Did they copy your article here: https://www.pluralsight.com/guides/how-to-use-contenteditable-elements-in-a-react-app?
Cheers for the tutorial I noticed a bug though at the end, if you update an existing row, it updates the one above instead. To fix this you need to add the below to line 111
return item.id === parseInt(row, 10) + 1
The other option is to start counting IDs for the store state from 0 instead.
Great article! Thanks!
Using Content Editable Elements in JavaScript (React) | Tania Rascia
Any element can be made editable with the addition of the attribute. This attribute is used all over the web, such as in Google Sheets. I'm…
https://www.taniarascia.com/content-editable-elements-in-javascript-react/