1
0
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:
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) {
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');
}
}
);
}
/**