Our blazing fast Grid component built with pure JavaScript


Post by boyitech »

Greetings!

I find a problem when I use 'Grid.feature.RowReorder' . I add a renderer to change the cell's color when the value is 99 and it works. However, when I try to reorder this row to other place, the row which be replaced will also be colored.

Image
Image


Post by tasnim »

Hi,

You need to add an else statement for that

        renderer : ({ cellElement, value }) => {
            if (value === 30) {
                cellElement.style.color = 'white';
                cellElement.style.background = 'green';
            } else {
                cellElement.style.color = null;
                cellElement.style.background = null;
            }
            return value;
        }

This will work


Post Reply