mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
fix: properly destroy/detach widgets in some cases
Sometimes, widgets were not properly destroyed/detached. This was caused by the fact that we used the hook remove, when we sometimes need to use the hook destroy as well.
This commit is contained in:
@@ -981,6 +981,8 @@ const widgetDirective: Directive = {
|
||||
ctx.parentNode
|
||||
}[_${dummyID}_index]=pvnode;pvnode.data.hook = {insert(vn){let nvn=w${widgetID}._mount(vnode, vn.elm);pvnode.elm=nvn.elm},remove(){w${widgetID}.${
|
||||
keepAlive ? "detach" : "destroy"
|
||||
}()},destroy(){w${widgetID}.${
|
||||
keepAlive ? "detach" : "destroy"
|
||||
}()}}; w${widgetID}.__widget__.pvnode = pvnode;});`
|
||||
);
|
||||
ctx.addElse();
|
||||
|
||||
Reference in New Issue
Block a user