[IMP] component: add 'set' method to allow extending state

closes #49
This commit is contained in:
Géry Debongnie
2019-04-18 10:15:50 +02:00
parent 3b3fd8a6c9
commit 4ee39282ca
2 changed files with 19 additions and 0 deletions
+4
View File
@@ -321,6 +321,10 @@ export class Component<
return shouldUpdate ? this._updateProps(nextProps) : Promise.resolve();
}
set(target: any, key: string | number, value: any) {
this.__owl__.observer!.set(target, key, value);
}
//--------------------------------------------------------------------------
// Private
//--------------------------------------------------------------------------