NPellet / visualizer

Other
42 stars 24 forks source link

slick grid and background color #1082

Closed lpatiny closed 6 years ago

lpatiny commented 6 years ago

I would like to have the possibility to change the background color of a line from the script. This could be used for stock or requests status.

stropitek commented 6 years ago

Implemented in 09b9aee3e01c22d7209335d8e4bb57622b1b1d92 Now possible using the postRender and renderAction events. They are similar events except the renderAction events is only for action columns and allows deeper configuration (icon, action etc...). postRender is triggered for each regular cell and you can set any css property on renderOptions

if(this.event === 'postRender' || this.event==='renderAction') {
    if(DataBoolean.cast(this.row.item.isEven)) {
        this.renderOptions.backgroundColor = 'lightblue';
        this.renderOptions.color = 'orange';
    }
}