1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 16:07:34 +02:00

Run code to rebuild tooltip oncreate AND onupdate

This commit is contained in:
Alexander Skvortsov
2020-09-11 10:39:25 -04:00
committed by Franz Liedke
parent 571ed8d8e5
commit d7ef260c54

View File

@@ -34,7 +34,17 @@ export default class PostEdited extends Component {
);
}
oncreate(vnode) {
super.oncreate(vnode);
this.rebuildTooltip();
}
onupdate() {
this.rebuildTooltip();
}
rebuildTooltip() {
if (this.shouldUpdateTooltip) {
this.$().tooltip('destroy').tooltip();
this.shouldUpdateTooltip = false;