{row}
)); +const Notes = ({ data, onEditNote }) => { + const { report_id, test_id } = data; + const notes = data.notes || ''; + const [editMode, setEditMode] = useState(false); + const [editValue, setEditValue] = useState(notes); + const id = uuid(); + const cell = notes.split('\n').map((row, index) => ({row}
)); - function onKeyDown(e) { - if (e.key === 'Enter') { - save(); - } + function onKeyDown (e) { + if (e.key === 'Enter') { + save(); } + } - function save() { - if (editMode) { - setEditMode(false); - onEditNote(test_id, report_id, editValue); - } + function save () { + if (editMode) { + setEditMode(false); + onEditNote(test_id, report_id, editValue); } + } - return( + return ( -