[GH #3339] AutoColumnSize is not calculating column size accurately

Hi,

I am having this issue where automatically sized columns are not correctly resizing according to the cell in the column that supposedly takes the largest amount of space. Please refer to the image below in the red circles. The values are not wrapping, which would be correct as I turned off the wordWrap feature. However, the AutoColumnSize feature is turned on by default (not defined in setting, so automatically on), and the columns did not adjust correctly to fit the biggest occupying cell.

image

Here are my settings used, I am running handsontable v8.3.2 and the officially supported React wrapper @handsontable/react v5.0.0. Appreciate any help or insight if other developers have faced the same issue before.

Thank you.

Prakoso

Hi @prakoso.santoso

do you generate the data via custom renderer or attach numeric formatting?

Hi Aleksandra,

Thank you for the quick response, we are currently formatting the cells using a custom renderer which is provided to the cells property in the settings, sorry I missed that out as it is dynamically patched in. Basically it converts the cell value into string, and appends or trims the decimal points such that it has a minimum and maximum of 6 d.p, does some coloring, text align, etc.



After processing x number of renderers, we have an aggregator then will apply all the effects of the other renderers in the cells function.

May I ask what is attaching numeric formatting?

Prakoso

Thank you for sharing additional details. The issue you have stumbled upon is this one https://github.com/handsontable/handsontable/issues/3339
A month ago my colleague pushed changes that can help to overcome this issue. The changes hasn’t been yet published under a new version but you can test it here https://github.com/handsontable/handsontable/pull/7633

Hi Aleksandra,

I am trying to run handsontable at the develop branch as the changes are only applied there. As I am running the react wrapper of handsontable as well, I face some issue trying to get it to be compatible with each other. I am currently running the react wrapper at v5.0.0, which version should I use?

image

I have asked the colleague about the date of the release and it seems that everything is ready on that branch. I suggest waiting for the official release. We should start a code freeze tomorrow. It means that the next version of Handsontable will be ready for the 2nd week on May.

Alright thanks for the update, I will wait for the release then!

Thank you!

Hi @prakoso.santoso

We just released version 8.4.0 where we fix that issue.

Please contact me at support@handsontable.com after testing the solution. I would appreciate any feedback.

Refrence: https://github.com/handsontable/handsontable/issues/3339