mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] asyncroot: create asyncroot component
This component replaces the t-asyncroot directive.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Component } from "../component/component";
|
||||
import { xml } from "../tags";
|
||||
|
||||
/**
|
||||
* AsyncRoot
|
||||
*
|
||||
* Owl is by default asynchronous, and the user interface will wait for all its
|
||||
* subcomponents to be rendered before updating the DOM. This is most of the
|
||||
* time what we want, but in some cases, it makes sense to "detach" a component
|
||||
* from this coordination. This is the goal of the AsyncRoot component.
|
||||
*/
|
||||
|
||||
export class AsyncRoot extends Component<any, any> {
|
||||
static template = xml`<t t-slot="default"/>`;
|
||||
|
||||
async __updateProps(nextProps, parentFiber) {
|
||||
this.render(parentFiber.force);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user