Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix: correctly save name on blur
Browse files Browse the repository at this point in the history
  • Loading branch information
marionebl committed Sep 10, 2018
1 parent afb99a9 commit 44cb129
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/container/editable-title/editable-title-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,11 @@ export class EditableTitleContainer extends React.Component<EditableTitleContain
return;
}

const name = this.props.page.getName();
const editedName = this.props.page.getEditedName();

this.editNameState = Types.EditableTitleState.Editable;
this.props.page.setName(
this.props.page.getName({ unedited: true }),
Types.EditableTitleState.Editing
);

if (editedName !== name) {
store.commit();
}
this.props.page.setName(this.props.page.getName(), Types.EditableTitleState.Editing);

store.commit();
}

protected handleChange(e: React.ChangeEvent<HTMLInputElement>): void {
Expand Down

0 comments on commit 44cb129

Please sign in to comment.