mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] app: mount app in "first-child" position
We reintroduce the possibility to mount the app in first position in a target. The option "self" has been dropped since it is now possible for a component to have several top level nodes.
This commit is contained in:
committed by
Aaron Bohy
parent
aa3148eddf
commit
ebd2e4324f
@@ -6,6 +6,7 @@ import {
|
||||
makeChildFiber,
|
||||
makeRootFiber,
|
||||
MountFiber,
|
||||
MountOptions,
|
||||
RootFiber,
|
||||
__internal__destroyed,
|
||||
} from "./fibers";
|
||||
@@ -92,8 +93,8 @@ export class ComponentNode<T extends typeof Component = any> implements VNode<Co
|
||||
this.component.setup();
|
||||
}
|
||||
|
||||
mountComponent(target: any): Promise<InstanceType<T>> {
|
||||
const fiber = new MountFiber(this, target);
|
||||
mountComponent(target: any, options?: MountOptions): Promise<InstanceType<T>> {
|
||||
const fiber = new MountFiber(this, target, options);
|
||||
this.app.scheduler.addFiber(fiber);
|
||||
this.initiateRender(fiber);
|
||||
return fiber.promise.then(() => this.component);
|
||||
|
||||
Reference in New Issue
Block a user