11 Commits

Author SHA1 Message Date
FrancoisGe 70101e4c66 [IMP] parser: .trim modifier implies .lazy modifier
Before to this commit, the .trim modifier did not work correctly. The value
in the model is always trim at each input event but not the visual value
in the input. This difference between the visual and the model value cause
few strange bug.

After reflection, we think that we always want to be in .lazy when we use .trim.
Because we want to trim the final value during the onchange event and not
at each input event. If we do it at each input event, we can't write more then
one word easily.

So this commit change the behavior of the .trim modifier to always be in .lazy
2024-01-04 11:07:37 +01:00
Géry Debongnie e4c296a7d2 [FIX] compiler: allow t-model.number to work with select
Before this commit, owl parser would ignore the `.number` suffix on
<select> options. I do not see a good reason for that, and it prevents
some legitimate usecases.

closes #1444
2023-07-12 10:23:36 +02:00
Lucas Perais cea82e945d [FIX] compiler: t-model supports radio group in t-foreach
Have a radio group defined inside a t-foreach:
```xml
  <t t-foreach="values" t-as="val" t-key="val">
    <input name="radiogroup" t-att-value="val" t-model="state.radioGroup" />
  </t>
```

Before this commit the algorithm that set the "checked" attribute on the current active
radio button according to the state did not support having a dynamic value (`t-att-value`)

After this commit, this use case works as we go look in the dynamic attributes too.
2023-01-20 09:26:54 +01:00
Géry Debongnie 4a5316ced5 [FIX] t-model takes precedence over t-on-input
With this commit, we make sure that the code for t-model is run before
t-on-input event handler.  This is useful to make sure that the state
reflected by t-model is up-to-date.

closes #1295
2022-11-22 12:57:36 +01:00
Géry Debongnie 22a79cdedd [REF] reorganize file structure
in order to separate compiler/ and runtime/ code
2022-05-31 14:00:01 +02:00
Géry Debongnie 3536f41f00 [FIX] blockdom: undefined properties are treated as empty strings 2022-02-15 09:07:32 +01:00
Bruno Boi 3af5e57825 [FIX] component: properly capture expression of t-model 2022-02-11 10:46:44 +01:00
Lucas Perais (lpe) 753d82149e [FIX] compiler: t-model on select with options with dynamic values 2022-02-11 10:46:44 +01:00
Samuel Degueldre f3555cfae0 [IMP] misc: update typescript to 4.5.2 2022-02-11 10:41:18 +01:00
Bruno Boi 219923d752 [IMP] qweb: introduce t-model directive
supported modifiers: lazy, trim, number
2022-02-11 10:41:18 +01:00
Lucas Perais (lpe) 52fa81c510 [FIX] re-introduce some missing tests
The point is to have visibility on the development of the owl2 features.
This commit reintroduces some tests keeping them skipped in order to fulfill that purpose.

There still are some missing tests though.
2022-02-11 10:18:03 +01:00