1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-26 08:11:17 +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,15 +1029,18 @@ 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) { if (this.state.currentItem.id) {
this.saveItem(); this.saveItem();
trackEvent('ui', 'titleChanged'); trackEvent('ui', 'titleChanged');
} }
} }
);
}
/** /**
* Handles all user triggered preference changes in the UI. * Handles all user triggered preference changes in the UI.