Hi,
I'm using the igNumericEditor with knockout binding and noticed that sometimes the underlying value changes when the user just focuses the editor without entering a new value. This always happens when the value is larger than 1000.
I have prepared an example here: http://jsfiddle.net/b2xzk3hy/5/
with v16.2.20162.2040 i'm seeing the following behavior:
A: If you focus the input the value does not change until you enter a new value. (This is the expectd behavior)
B (same as A, but the value is over 1000) : If you focus the input the value gets truncated to 2 decimals.
Remarks:
This only seems to happen when the updateMode is set to "immediate".
This does not happen when the groupSeparator option is set to an empty string.
Hello Robin,
I am glad the initial approach is working for you, as well for sharing it with other users!
HI,
Thanks for the quick reply.
The proposed solution does not work for me since the user should only see the first two decimal places.
My current workaround is to set the groupSeparator option to an empty string:
<div id="valueBIG" class="gosho row-control" data-bind="igNumericEditor: { value: valueB, updateMode: 'immediate', groupSeparator:'' }"></div>
http://jsfiddle.net/p4r1p4nd/
Hello, Thank you for posting in our community! Regarding the truncated input value for the igNumericEditor, I believe you may safely use the maxDecimals option in order to have all the required decimals. This option has priority over possible regional settings and sets the maximum number of decimal places which are used in display mode(no focus).
For example: <div id="valueBIG" class="gosho row-control" data-bind="igNumericEditor: { value: valueB, updateMode: 'immediate', maxDecimals:15 }"></div>
http://jsfiddle.net/78dkkdcm/1/
Please let me know how this approach works for you.