Cleave.js: Clarify `numeralIntegerScale`

Created on 18 Jul 2017  路  10Comments  路  Source: nosir/cleave.js

Hey @nosir,
thanks for this project.


You ought to clarify what numeralIntegerScale entails in the docs, would have especially helpful if your releases included a breaking change section

In one project, we found out that this has affected all numerical values (including inputs which represented a money value such as a price of a product) of our app, where the value exceeded the length of 10 (default value to numeralIntegerScale)

ref: https://github.com/nosir/cleave.js/issues/196

resolved

Most helpful comment

I would disable defaulting to any numeral integer scale as it might confuse people. Whenever they opt into it, it's an explicit choice.

All 10 comments

Hey, do you mean this? https://github.com/nosir/cleave.js/blob/master/doc/options.md#numeralintegerscale

But I agree, 10 is not an ideal default value, will change to make it backward compatible

yes, that is the option I was referring to.

possible solution:
either that, or you have it disabled when no value is given upon mount.

I would disable defaulting to any numeral integer scale as it might confuse people. Whenever they opt into it, it's an explicit choice.

Okay, will fix.

@nosir with the upcoming fix, will it be compatible with numeralIntegerScale: 0 for disabled?
at the moment we set numeralIntegerScale to 0 to disable it

Yes, either 0 or no value is given will disable the integer scale, so it will be fine in your case.

perfect, @nosir 馃憣馃徑
I like this.
looking forward to your update

Thanks a lot!

thanks @nosir 馃憣馃従

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ozkxr picture ozkxr  路  3Comments

CaptainYarb picture CaptainYarb  路  3Comments

wcedmisten picture wcedmisten  路  4Comments

periabyte picture periabyte  路  7Comments

yardz picture yardz  路  6Comments