Add new column with updateSettings

Tags: #<Tag:0x00007efc6211b4c0>

Hello,

I am currently try to add new column to multiple handsontable instance. My data source is an array with object like :

[
    {
        data: "1",
        type: "numeric"
    }
]

And colHeaders is a simple array :

["Price"]

But when i add element in settings and use updateSettings, the hot display a new column without custom header and with empty reference (prop, col) in cells option function :

return function (row, col, prop) {
     // prop & col = null
     var colSettings = this.instance.getSettings().columns[col];

     return cellProperties;
}

I am trying to create JSFiddle, but it works so if you have any idea, maybe i forget something ?

Tested in version PRO 1.7.1 (0.28.1)

Thanks you :wink:

Hi @jsiali
I’ve made the following demo http://jsfiddle.net/hvtm1bho/ Can you add the code or provide more details on what you would like to get.

1 Like

Hi @aleksandra_budnik,

Thans for your reply ;),
I am sorry, as you can see in this example (http://jsfiddle.net/09vnq18d/) it still works :confused: i think in my project something altered with the updateSettings.

I am going search again and come back with the solution :wink: (perhaps :smile:)

OK, I’ll keep my fingers crossed :wink:

1 Like

Ok ! After an hour of search, i found how to reproduce my problem :wink:

As you can see in this example : http://jsfiddle.net/1r878j34/

When you updateSettings with the new column, the table don’t take new parameters.
To reproduce it, manualColumnMove is true.

@aleksandra_budnik, can you confirm that bug, please ?
If it’s confirmed, please send me a email for more details about license and fix delay.

Regards.

Hi @jsiali
I’ve tried to create a similar case from a scratch and made this example: http://jsfiddle.net/rz6ydgnc/
Am I missing some crucial settings here? It looks like it works fine

Hi @aleksandra_budnik

Yes you forget manualColumnMove settings, i made this example : http://jsfiddle.net/m1qvLpj0/
As you can see it doesn’t works with manualColumnMove as true.

Oh, yes - you’re right!
I’ve added this issue to our Github board at: https://github.com/handsontable/handsontable/issues/3800

as there are also few related bugs reported there.
Feel free to leave a comment at https://github.com/handsontable/handsontable/issues/3800 if needed.

1 Like

Thanks you very much @aleksandra_budnik )

I am going to comment your issue :wink:

How can we put this issue in priority ? It’s blocking my development and i haven’t got a temporary solution…

Regards.

I’m not able to set higher priority for bugs but I will ask one of our devs is there any workaround for this issue.

1 Like

Thanks you very very very much @aleksandra_budnik for your help :yum:

Have a nice day :wink:

Fix in Handsontable 0.28.4 :grinning:

Yup, we can close this issue :slight_smile:
again thanks for sharing @jsiali and I’m glad we were able to fix it

1 Like