Goal: I want to make an editable table cell component. If the user double clicks on the cell, it's content transforms to an input. If he/she click outside the input, or press enter, the cell returns to it's original state.
What I have so far: I made a simple version, which is a good starting point. The component has an 'edit' state. If it false, the component shows the value. If true, the component shows an input box, and passes
- the value
- the component itself, as parent
- a function, which will be run on 'mouseLeave' event
Aucun commentaire:
Enregistrer un commentaire