I’ve upgraded from an earlier version of handsontables
I have an issue where I can’t display units with out decimal places, please could you help; without editing the input value, too a number without decimal places.
I was using handsontable 1.14.2 this allowed a format of ‘0,0’ , I have a table full of formats for different columns that are read via an API call. This is something I would not of expected to change. Isn’t this a handsontable bug. This will mean I have to hack about with the code inserting and removing
Not so long time ago Numbro, the library that we use to handle numeric cell type, has upgraded to v 2.0. Now, when you want to round a number you use
mantissa to round it up https://jsfiddle.net/rabq614y/
(I do not see anything that can be used to round it down but I have asked our developer to check it)
I have left myself a note to create some tutorials on that subject and share on the blog or in the docs. Thanks for spotting that. It is hard to find, especially for devs who update the library and suddenly it does not work.
This change seems to work, except now when entering a value such as 750220.55 becomes 750K, which isn’t ideal, especially when the values has already been rounded up by 1000.
numbro seem to have a issue listed, but this doesn’t fix my problem in handsontable. they use ‘0a’ with the same k issue.
they suggested example using: numbro(132324.52345).format({mantissa:0}), which doesn’t seem to work with handsontable ie pattern = ''mantissa:0".
Please could you let me know what is happening with this. Has it been fixed. There should also be a breakage report in your git code report from “1.15.0”
I Have created my own fix at the moment but will try this when I can update to 7+. Having issues with 7 mentioned on another ticket so stuck on 6.22, but would be good to use your fix at some point.
I had same issues, my company will be upgrading and we tried updating to 7.0 and found some of the old 1.xx code was invalid; we had set our numeric columns to precision of 3, now it’s broken. The numericFormat entry in your docs section does not correctly describe current syntax. And going to numbro site doesn’t give a straight ahead explanation either. Can you update the numeric format entries to list all correct properties and expected values?
Agreed, the documentation on number formatting needs some serious updating, it took me way too long to find this post. And as Pavel mentioned, the numbro documentation is not directly applicable to hot.
As Pavel said, it would be nice to have examples showing how the various formatting options available in numbro can be used in hot, like thousandSeparated, spaceSeparated etc.