Commit 9a30efb
committed
Fix issue #10 When using an object to modify both the
Fix the issue where updating the `options` to new ones with a higher `decimalPlacesRawValue` loses the additional decimal places
Now allows to update the `options` by passing an array of options (with objects and predefined option names)
When the `options` and `value` are both set at the same time, `vue-autonumeric` now always update the `options` first, before setting the `value`.
- This allows to use objects with the value and a predefined option name to modify the vue-autonumeric component.
- Note: There is a know bug yet; if you use multiple `vue-autonumeric` component sharing the same `v-model` but *different* options, changing the value/option *may* not work correctly.
- This is due to the fact that when vue-autonumeric detects a value change, it `set()` it since it does not come from a user interaction.
- However if one of the `vue-autonumeric` component has a `decimalPlaces` option set to `2`, and another set to `5`, then the first component will drop the additional decimal places when using `set()`...which in turn will make the other component aware of that new value change, and the second component will then use that new cropped value as well.
Signed-off-by: Alexandre Bonneau <alexandre.bonneau@linuxfr.eu>:value and :options props, the options is not always modified before the value1 parent a471910 commit 9a30efb
File tree
6 files changed
+173
-49
lines changed- dist
- examples-src
- src/components
6 files changed
+173
-49
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
3 | 13 | | |
4 | 14 | | |
5 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
396 | 405 | | |
397 | 406 | | |
398 | 407 | | |
| |||
422 | 431 | | |
423 | 432 | | |
424 | 433 | | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
430 | 440 | | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | 441 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | 442 | | |
442 | | - | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
443 | 452 | | |
444 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
445 | 465 | | |
446 | 466 | | |
447 | | - | |
| 467 | + | |
448 | 468 | | |
449 | 469 | | |
450 | 470 | | |
| |||
0 commit comments