[IMP] component: add support for dynamic css on t-widget

closes #80
This commit is contained in:
Géry Debongnie
2019-05-06 10:36:40 +02:00
parent 51320204f9
commit b9591cfecd
4 changed files with 200 additions and 10 deletions
+11
View File
@@ -104,6 +104,17 @@ root widget element.
</div>
```
Warning: there is a small caveat with dynamic class attributes: since Owl needs
to be able to add/remove proper classes whenever necessary, it needs to be aware
of the possible classes. Otherwise, it will not be able to make the difference
between a valid css class added by the component, or some custom code, and a
class that need to be removed. This is why we only support the explicit syntax
with a class object:
```js
<t t-widget="MyWidget" t-att-class="{a: state.flagA, b: state.flagB}">
```
## Reference