[FIX] component: cancel previous mounting operations if necessary

closes #626
This commit is contained in:
Géry Debongnie
2020-02-16 09:46:47 +01:00
committed by aab-odoo
parent 03585d8fea
commit f7728b93bd
8 changed files with 156 additions and 61 deletions
+2 -2
View File
@@ -124,7 +124,7 @@ export class Portal extends Component<Props> {
*
* @override
*/
__patch(vnode) {
__patch(target, vnode) {
if (this.doTargetLookUp) {
const target = document.querySelector(this.props.target);
if (!target) {
@@ -153,7 +153,7 @@ export class Portal extends Component<Props> {
this.portal = patch(portalPatch, vnode.children![0] as VNode);
vnode.children = [];
super.__patch(vnode);
super.__patch(target, vnode);
if (shouldDeploy) {
this.__deployPortal();