From b39692e6f707eb2eb87d04a53eeb26815ff8135f Mon Sep 17 00:00:00 2001 From: Liordino Neto Date: Wed, 30 Sep 2020 17:43:27 -0300 Subject: [PATCH] fix: make save buttons always shows up prior to cancel buttons fix: make all save buttons of submit type --- .../BooleanPropertiesTable.js | 10 +++++----- .../src/components/editableTable/Row.js | 13 +++++++------ .../src/components/editableTable/Row.styles.js | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/new-lamassu-admin/src/components/booleanPropertiesTable/BooleanPropertiesTable.js b/new-lamassu-admin/src/components/booleanPropertiesTable/BooleanPropertiesTable.js index ca739b89..d6257735 100644 --- a/new-lamassu-admin/src/components/booleanPropertiesTable/BooleanPropertiesTable.js +++ b/new-lamassu-admin/src/components/booleanPropertiesTable/BooleanPropertiesTable.js @@ -59,14 +59,14 @@ const BooleanPropertiesTable = memo(

{title}

{editing ? (
- - Cancel + + Save - Save + onClick={innerCancel} + color="secondary"> + Cancel
) : ( diff --git a/new-lamassu-admin/src/components/editableTable/Row.js b/new-lamassu-admin/src/components/editableTable/Row.js index 6f6c77f0..f6b76eb5 100644 --- a/new-lamassu-admin/src/components/editableTable/Row.js +++ b/new-lamassu-admin/src/components/editableTable/Row.js @@ -43,14 +43,15 @@ const ActionCol = ({ disabled, editing }) => { {editing && ( - Cancel - - + className={classes.saveButton} + type="submit" + color="primary" + onClick={submitForm}> Save + + Cancel + )} {!editing && enableEdit && ( diff --git a/new-lamassu-admin/src/components/editableTable/Row.styles.js b/new-lamassu-admin/src/components/editableTable/Row.styles.js index 04d9b8d8..4f83d31a 100644 --- a/new-lamassu-admin/src/components/editableTable/Row.styles.js +++ b/new-lamassu-admin/src/components/editableTable/Row.styles.js @@ -1,7 +1,7 @@ import { bySize, bold } from 'src/styling/helpers' export default { - cancelButton: { + saveButton: { marginRight: 20 }, lastOfGroup: {