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
|
||||
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)
|
||||
3. t-ref
|
||||
|
||||
## Random Notes
|
||||
|
||||
|
||||
@@ -29,5 +29,5 @@ document.addEventListener("DOMContentLoaded", async function() {
|
||||
env.isMobile = isMobile;
|
||||
rootWidget.render();
|
||||
}
|
||||
}, 100));
|
||||
}, 50));
|
||||
});
|
||||
|
||||
@@ -68,8 +68,8 @@ export class ActionManager extends EventBus implements IActionManager {
|
||||
doAction(request: ActionRequest) {
|
||||
if (typeof request === "number") {
|
||||
// this is an action ID
|
||||
let name = request === 1 ? 'discuss' : 'crm';
|
||||
let title = request === 1 ? 'Discuss': 'CRM';
|
||||
let name = request === 1 ? "discuss" : "crm";
|
||||
let title = request === 1 ? "Discuss" : "CRM";
|
||||
let Widget = this.registry.getAction(name);
|
||||
this.stack = [
|
||||
{
|
||||
@@ -96,3 +96,4 @@ export class ActionManager extends EventBus implements IActionManager {
|
||||
this.doAction(actionID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,10 @@ export class Action extends Widget<Env, Props> {
|
||||
}
|
||||
|
||||
shouldUpdate(nextProps: Props) {
|
||||
this.props = nextProps;
|
||||
this.setContentWidget();
|
||||
if (nextProps.stack !== this.props.stack) {
|
||||
this.props = nextProps;
|
||||
this.setContentWidget();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user