mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] component: fix lifecycle order
This commit is contained in:
committed by
Aaron Bohy
parent
1f6e84d141
commit
af80cefa76
@@ -17,7 +17,7 @@ export function onWillUpdateProps(fn: (nextProps: any) => Promise<void> | void |
|
||||
|
||||
export function onMounted(fn: () => void | any) {
|
||||
const node = getCurrent()!;
|
||||
node.mounted.unshift(fn);
|
||||
node.mounted.push(fn);
|
||||
}
|
||||
|
||||
export function onWillPatch(fn: () => Promise<void> | any | void) {
|
||||
@@ -32,7 +32,7 @@ export function onPatched(fn: () => void | any) {
|
||||
|
||||
export function onWillUnmount(fn: () => Promise<void> | void | any) {
|
||||
const node = getCurrent()!;
|
||||
node.willUnmount.push(fn);
|
||||
node.willUnmount.unshift(fn);
|
||||
}
|
||||
|
||||
export function onDestroyed(fn: () => Promise<void> | void | any) {
|
||||
|
||||
Reference in New Issue
Block a user