mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] connected_component: some misc issues
- did not properly stop listening to the store after being destroyed - did not properly synchronize store updates in some async cases
This commit is contained in:
@@ -77,6 +77,10 @@ export class ConnectedComponent<T extends Env, P, S> extends Component<T, P, S>
|
||||
(this.__owl__ as any).store.off("update", this);
|
||||
super.__callWillUnmount();
|
||||
}
|
||||
__destroy(parent: any) {
|
||||
(this.__owl__ as any).store.off("update", this);
|
||||
super.__destroy(parent);
|
||||
}
|
||||
|
||||
async __updateProps(nextProps: P, f, p, s, v) {
|
||||
this.__updateStoreProps(nextProps);
|
||||
@@ -110,7 +114,7 @@ export class ConnectedComponent<T extends Env, P, S> extends Component<T, P, S>
|
||||
}
|
||||
const didChange = this.__updateStoreProps(this.props);
|
||||
if (didChange) {
|
||||
this.render();
|
||||
return this.render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user