Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
750
igNumericEditor truncates numbers over 1000 to 2 decimals when in focus
posted

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.

Parents
No Data
Reply
  • 10685
    Offline posted

    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.

Children