mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
call mounted hooks at proper timing
This commit is contained in:
@@ -22,7 +22,7 @@ export class Counter extends Widget<Env> {
|
||||
}
|
||||
|
||||
mounted() {
|
||||
debugger;
|
||||
console.log("counter mounter", this.el);
|
||||
}
|
||||
increment(delta: number) {
|
||||
this.updateState({ counter: this.state.counter + delta });
|
||||
|
||||
@@ -18,6 +18,9 @@ export class Navbar extends Widget<Env> {
|
||||
name = "navbar";
|
||||
template = template;
|
||||
|
||||
mounted() {
|
||||
console.log("navbar mounted", this.el);
|
||||
}
|
||||
getUrl(menu: Menu) {
|
||||
const action_id = String(menu.actionID);
|
||||
return this.env.router.formatURL("", { action_id });
|
||||
|
||||
@@ -15,6 +15,7 @@ export class Clock extends Widget<Env> {
|
||||
}
|
||||
|
||||
mounted() {
|
||||
console.log("clock mounter", this.el);
|
||||
setInterval(this.updateTime.bind(this), 500);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user