mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
small cleanup
This commit is contained in:
@@ -166,6 +166,7 @@ We have 3 main folders and 3 main files:
|
|||||||
list
|
list
|
||||||
c. t-keep-alive: makes sure the widget is not destroyed when removed from
|
c. t-keep-alive: makes sure the widget is not destroyed when removed from
|
||||||
the DOM (note that it will still be destroyed when parent is destroyed)
|
the DOM (note that it will still be destroyed when parent is destroyed)
|
||||||
|
3. t-ref
|
||||||
|
|
||||||
## Random Notes
|
## Random Notes
|
||||||
|
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ document.addEventListener("DOMContentLoaded", async function() {
|
|||||||
env.isMobile = isMobile;
|
env.isMobile = isMobile;
|
||||||
rootWidget.render();
|
rootWidget.render();
|
||||||
}
|
}
|
||||||
}, 100));
|
}, 50));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ export class ActionManager extends EventBus implements IActionManager {
|
|||||||
doAction(request: ActionRequest) {
|
doAction(request: ActionRequest) {
|
||||||
if (typeof request === "number") {
|
if (typeof request === "number") {
|
||||||
// this is an action ID
|
// this is an action ID
|
||||||
let name = request === 1 ? 'discuss' : 'crm';
|
let name = request === 1 ? "discuss" : "crm";
|
||||||
let title = request === 1 ? 'Discuss': 'CRM';
|
let title = request === 1 ? "Discuss" : "CRM";
|
||||||
let Widget = this.registry.getAction(name);
|
let Widget = this.registry.getAction(name);
|
||||||
this.stack = [
|
this.stack = [
|
||||||
{
|
{
|
||||||
@@ -96,3 +96,4 @@ export class ActionManager extends EventBus implements IActionManager {
|
|||||||
this.doAction(actionID);
|
this.doAction(actionID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -16,8 +16,10 @@ export class Action extends Widget<Env, Props> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
shouldUpdate(nextProps: Props) {
|
shouldUpdate(nextProps: Props) {
|
||||||
this.props = nextProps;
|
if (nextProps.stack !== this.props.stack) {
|
||||||
this.setContentWidget();
|
this.props = nextProps;
|
||||||
|
this.setContentWidget();
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user