mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] component: components key is now static
This is a breaking change! closes #279
This commit is contained in:
@@ -92,6 +92,7 @@ export class Component<T extends Env, Props extends {}, State extends {}> {
|
||||
get el(): HTMLElement | null {
|
||||
return this.__owl__.vnode ? (<any>this).__owl__.vnode.elm : null;
|
||||
}
|
||||
static components = {};
|
||||
|
||||
env: T;
|
||||
state?: State;
|
||||
|
||||
@@ -388,7 +388,7 @@ QWeb.addDirective({
|
||||
// new component
|
||||
ctx.addLine(`let componentKey${componentID} = ${ctx.interpolate(value)};`);
|
||||
ctx.addLine(
|
||||
`let W${componentID} = context.components && context.components[componentKey${componentID}] || QWeb.components[componentKey${componentID}];`
|
||||
`let W${componentID} = context.constructor.components[componentKey${componentID}] || QWeb.components[componentKey${componentID}];`
|
||||
);
|
||||
// maybe only do this in dev mode...
|
||||
ctx.addLine(
|
||||
|
||||
Reference in New Issue
Block a user