Commit 0bea738
[FIX] selection input: highlight color not sync with range color
After re-ordering the selection inputs of a chart, the highlight colors
would not be the same as the range colors.
This was because the store mutator `updateColors` would not update
the store range colors. And `store.highlights` is based on
`ranges.colors` while `store.selectionInputs` ignores the colors
of `store.ranges`.
The test `update of colors are taken into account` was also a bit
sketchy. We would modify the `props.colors` array in place, thus
the condition `nextProps.colors !== props.colors` would never
be satisfied, and `store.updateColors` would never be called.
closes #5734
Task: 4577803
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>1 parent 0ffa187 commit 0bea738
File tree
2 files changed
+21
-10
lines changed- src/components/selection_input
- tests/selection_input
2 files changed
+21
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
| |||
206 | 211 | | |
207 | 212 | | |
208 | 213 | | |
209 | | - | |
210 | 214 | | |
211 | 215 | | |
212 | 216 | | |
213 | 217 | | |
214 | 218 | | |
215 | 219 | | |
216 | | - | |
| 220 | + | |
217 | 221 | | |
218 | 222 | | |
219 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
237 | | - | |
| 238 | + | |
238 | 239 | | |
239 | 240 | | |
240 | 241 | | |
241 | | - | |
242 | | - | |
| 242 | + | |
| 243 | + | |
243 | 244 | | |
244 | 245 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
249 | 252 | | |
250 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
251 | 258 | | |
252 | 259 | | |
253 | 260 | | |
| |||
0 commit comments