Rename hasChanged
to enableSave
for the editor Save button.
This commit is contained in:
parent
75aa52a650
commit
87f942e73b
@ -47,7 +47,7 @@ class EntryEditor extends Component {
|
||||
fieldsErrors,
|
||||
getAsset,
|
||||
onChange,
|
||||
hasChanged,
|
||||
enableSave,
|
||||
showDelete,
|
||||
onDelete,
|
||||
onValidate,
|
||||
@ -132,7 +132,7 @@ class EntryEditor extends Component {
|
||||
onCancelEdit={onCancelEdit}
|
||||
onDelete={onDelete}
|
||||
showDelete={showDelete}
|
||||
hasChanged={hasChanged}
|
||||
enableSave={enableSave}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -151,7 +151,7 @@ EntryEditor.propTypes = {
|
||||
onChange: PropTypes.func.isRequired,
|
||||
onValidate: PropTypes.func.isRequired,
|
||||
onPersist: PropTypes.func.isRequired,
|
||||
hasChanged: PropTypes.bool.isRequired,
|
||||
enableSave: PropTypes.bool.isRequired,
|
||||
showDelete: PropTypes.bool.isRequired,
|
||||
onDelete: PropTypes.func.isRequired,
|
||||
onRemoveAsset: PropTypes.func.isRequired,
|
||||
|
@ -5,12 +5,12 @@ const EntryEditorToolbar = (
|
||||
{
|
||||
isPersisting,
|
||||
onPersist,
|
||||
hasChanged,
|
||||
enableSave,
|
||||
showDelete,
|
||||
onDelete,
|
||||
onCancelEdit,
|
||||
}) => {
|
||||
const disabled = !hasChanged || isPersisting;
|
||||
const disabled = !enableSave || isPersisting;
|
||||
return (
|
||||
<div>
|
||||
<Button
|
||||
@ -38,7 +38,7 @@ const EntryEditorToolbar = (
|
||||
EntryEditorToolbar.propTypes = {
|
||||
isPersisting: PropTypes.bool,
|
||||
onPersist: PropTypes.func.isRequired,
|
||||
hasChanged: PropTypes.bool.isRequired,
|
||||
enableSave: PropTypes.bool.isRequired,
|
||||
showDelete: PropTypes.bool.isRequired,
|
||||
onDelete: PropTypes.func.isRequired,
|
||||
onCancelEdit: PropTypes.func.isRequired,
|
||||
|
@ -151,7 +151,7 @@ class EntryPage extends React.Component {
|
||||
onPersist={this.handlePersistEntry}
|
||||
onDelete={this.handleDeleteEntry}
|
||||
showDelete={this.props.showDelete}
|
||||
hasChanged={entryDraft.get('hasChanged')}
|
||||
enableSave={entryDraft.get('hasChanged')}
|
||||
onCancelEdit={this.handleCloseEntry}
|
||||
/>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user