numericFormat not showing properly

Tags: #<Tag:0x00007f8b28ec14d0>

Hi,

I have noticed some strange behaviour in my spreadsheet.

The pattern of the shown row is defined as percentage.
Behind it, 0.09 is stored as the value in each cell.

Nevertheless, 900% is displayed everywhere.

But if I double-click the cell and (without changing the value) click Enter, it shows the correct formatting 9%.

What could be the reason for this?

screen2

2022-09-24

screen

Hi @tomnovo

I have two questions:

  1. What version of Handsontable do you use? (The length of this cell editor reminds me of an issue that was fixed some time ago)
  2. What are your settings for the cells/ columns and numericFormat?

Hi Aleksandra,

I am using the following inserts in the header:

And these are the setting for the cells/columns:

Screenshot%202022-09-26%20101627

The above behaviour occurs in row 92, but strangely not in the other rows.

I think that the issue can be connected to some other settings that those provided. Here https://jsfiddle.net/v4kpbhaz/2/ I set up the cells method to attach the same logic, and using the latest Chrome and Handsontable v11 (as shown on the screenshot), we do not get the same issue. Could you please add te settings that you have in the configuration object of your Handsontable instance so I could replicate the issue on my device?

I have a very complex spreadsheet with about 150 rows and 50 columns, which I don’t want to reveal here publicly for “operational reasons”. Therefore, I have left out most of the data part. I hope this is sufficient to find the error. Unfortunately, it’s a bit much code.

Here is the remaining complete part of the configuration:

https://jsfiddle.net/651of3h7/

Most importantly, are you able to specify what steps I should take to replicate the same issue using your demo? On the image above we see that there are many rows and someone around 90th row we have an issue. In the following demo, I can only see 2 rows.

Would it be more convenient for you to share and test the demo on a call? You can replace your dataset (which is surely confidential) with

hot.batch(() => {
	for(let i = 0; i < hot.countRows(); i++){
  	hot.setDataAtCell(i, 1, 0.09)
  }
})

Hi @tomnovo

do we have any updates regarding this thread? Have you managed to solve the issue?

I’m sorry, I unfortunately haven’t had time to create a demo account yet. I’ll try to do it this weekend.

Hi @aleksandra_budnik

I managed to solve the problem quite simply by using ‘=0.09’ instead of just ‘0.09’.

Now the formatting is displayed correctly in the table.

Thanks a lot for your effort anyway!

I’m more than glad to hear that the issue is gone, @tomnovo

Thank you for the update. We can close the thread.