fix: make save buttons always shows up prior to cancel buttons

fix: make all save buttons of submit type
This commit is contained in:
Liordino Neto 2020-09-30 17:43:27 -03:00 committed by Josh Harvey
parent 7da522b1da
commit b39692e6f7
3 changed files with 13 additions and 12 deletions

View file

@ -59,14 +59,14 @@ const BooleanPropertiesTable = memo(
<H4>{title}</H4> <H4>{title}</H4>
{editing ? ( {editing ? (
<div className={classes.rightAligned}> <div className={classes.rightAligned}>
<Link onClick={innerCancel} color="secondary"> <Link type="submit" color="primary">
Cancel Save
</Link> </Link>
<Link <Link
className={classes.rightLink} className={classes.rightLink}
type="submit" onClick={innerCancel}
color="primary"> color="secondary">
Save Cancel
</Link> </Link>
</div> </div>
) : ( ) : (

View file

@ -43,14 +43,15 @@ const ActionCol = ({ disabled, editing }) => {
{editing && ( {editing && (
<Td textAlign="center" width={actionColSize}> <Td textAlign="center" width={actionColSize}>
<Link <Link
className={classes.cancelButton} className={classes.saveButton}
color="secondary" type="submit"
onClick={resetForm}> color="primary"
Cancel onClick={submitForm}>
</Link>
<Link color="primary" onClick={submitForm}>
Save Save
</Link> </Link>
<Link color="secondary" onClick={resetForm}>
Cancel
</Link>
</Td> </Td>
)} )}
{!editing && enableEdit && ( {!editing && enableEdit && (

View file

@ -1,7 +1,7 @@
import { bySize, bold } from 'src/styling/helpers' import { bySize, bold } from 'src/styling/helpers'
export default { export default {
cancelButton: { saveButton: {
marginRight: 20 marginRight: 20
}, },
lastOfGroup: { lastOfGroup: {