()
| 123 | ); |
| 124 | |
| 125 | function onSave() { |
| 126 | if (readOnly) { |
| 127 | return; |
| 128 | } |
| 129 | const error = getValidationError(text); |
| 130 | |
| 131 | setError(error); |
| 132 | |
| 133 | if (error === null) { |
| 134 | props.updateCellOnClient({ ...cell, text }); |
| 135 | props.updateCellOnServer(cell, { text }); |
| 136 | setStatus('view'); |
| 137 | return true; |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | const deleteButton = !readOnly ? ( |
| 142 | <DeleteCellWithConfirmation onDeleteCell={() => props.onDeleteCell(cell)}> |
no test coverage detected