Update submission UI whenever there is a config update.

This commit is contained in:
Ajay Ramachandran
2020-04-20 00:33:41 -04:00
parent 2f5c239c82
commit 89f72c185c

View File

@@ -47,6 +47,9 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
document.getElementById("sponsorTimesContainer" + this.idSuffix).addEventListener('keydown', function (event) {
event.stopPropagation();
});
// Add as a config listener
Config.configListeners.push(this.configUpdate.bind(this));
}
render() {
@@ -319,6 +322,10 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
this.props.submissionNotice.forceUpdate();
}
}
configUpdate() {
this.forceUpdate();
}
}
export default SponsorTimeEditComponent;