add edit and cancel functions

This commit is contained in:
Eduardo Quiros 2022-08-30 04:04:10 -06:00
parent 200863e797
commit de607882a1
No known key found for this signature in database
GPG Key ID: B77F36C3F12720B4
1 changed files with 12 additions and 0 deletions

View File

@ -112,6 +112,18 @@ const RegistroComunicado = () => {
) )
} }
const edit = (rowData) => {
setComunicado(rowData);
setComunicadoId(rowData._id);
setSaveButtonLabel('Actualizar');
}
const cancelEdit = () => {
setComunicado(emptyComunicado);
setSaveButtonLabel('Registrar');
setComunicadoId(null);
}
const actions = (rowData) => { const actions = (rowData) => {
return ( return (
<div className="actions"> <div className="actions">