mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-23 23:11:12 +02:00
fix title not saving on blur
This commit is contained in:
@@ -1029,14 +1029,17 @@ export default class App extends Component {
|
||||
}
|
||||
|
||||
titleInputBlurHandler(e) {
|
||||
this.setState({
|
||||
currentItem: { ...this.state.currentItem, title: e.target.value }
|
||||
});
|
||||
|
||||
if (this.state.currentItem.id) {
|
||||
this.saveItem();
|
||||
trackEvent('ui', 'titleChanged');
|
||||
}
|
||||
this.setState(
|
||||
{
|
||||
currentItem: { ...this.state.currentItem, title: e.target.value }
|
||||
},
|
||||
() => {
|
||||
if (this.state.currentItem.id) {
|
||||
this.saveItem();
|
||||
trackEvent('ui', 'titleChanged');
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user