mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] component: remove onDestroyed, implement onWillDestroy
This commit is contained in:
committed by
Aaron Bohy
parent
8c600fa539
commit
779003e715
@@ -35,9 +35,9 @@ export function onWillUnmount(fn: () => Promise<void> | void | any) {
|
||||
node.willUnmount.unshift(fn);
|
||||
}
|
||||
|
||||
export function onDestroyed(fn: () => Promise<void> | void | any) {
|
||||
export function onWillDestroy(fn: () => Promise<void> | void | any) {
|
||||
const node = getCurrent()!;
|
||||
node.destroyed.push(fn);
|
||||
node.willDestroy.push(fn);
|
||||
}
|
||||
|
||||
export function onWillRender(fn: () => void | any) {
|
||||
|
||||
Reference in New Issue
Block a user