autoNumeric/vue-autoNumeric

Add a new `resetOnOptions` props so that updating the `options` one first reset to the default options

Closed this issue · 1 comments

Add a resetOnOptions prop set the true by default so that updating the options prop first call .options.reset().

This is useful when using predefined option names that do not declare all the options. For instance when switching from 'integer' to 'euro', the decimalPlaces is not set from 0 to 2 and you have to first update to the default configuration if you want to obtain the same format than when using 'euro' directly.

This new resetOnOptions prop will by default make sure all options update will first get reset to the default options, before applying the new ones.

This can be avoided by setting resetOnOptions to false before changing the options value.

Fixed in v1.0.6