1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-25 07:51:12 +02:00

fix title not saving on blur

This commit is contained in:
Kushagra Gour
2024-04-30 15:53:05 +05:30
parent a557e060ee
commit 1e997a6f0d

View File

@@ -1029,14 +1029,17 @@ export default class App extends Component {
} }
titleInputBlurHandler(e) { titleInputBlurHandler(e) {
this.setState({ this.setState(
currentItem: { ...this.state.currentItem, title: e.target.value } {
}); currentItem: { ...this.state.currentItem, title: e.target.value }
},
if (this.state.currentItem.id) { () => {
this.saveItem(); if (this.state.currentItem.id) {
trackEvent('ui', 'titleChanged'); this.saveItem();
} trackEvent('ui', 'titleChanged');
}
}
);
} }
/** /**