Our blazing fast Grid component built with pure JavaScript


Post by johan.isaksson »

Hi,

It is not something that was ever intended to work, a checkbox selection column is tied to the selection model and only intended to control row selection.

May I ask what are you using field on it for?

Best regards,
Johan Isaksson

Post by fcoca@certinia.com »

Hi, the field property in the selection checkbox configuration was used to dynamically hide it. It is a workaround to this other reported issue: https://github.com/bryntum/support/issues/4932
The way you provide to access the selection column ( grid.columns.first or grid.columns.getAt(1)) is not totally correct because there are scenarios where the selection checkbox can change position.

So we are now in a position that several tables needs a refactor to make possible the upgrade to the latests Bryntum version.

Regards
Javi


Post by johan.isaksson »

Hi,

If grid.columns.first etc. is not reliable in your app then I recommend configuring the selection column with an id instead, and replace your calls to retrieve it, columns.get(field) -> columns.getById(id). That should hopefully require minimal changes in your code.

const grid = new Grid({
    selectionMode : {
        checkbox : {
            id : 'selectionColumn'
        }
    }
});

grid.columns.getById('selectionColumn');

Hope that helps!

Best regards,
Johan Isaksson

Post Reply