首页 > 解决方案 > 如何根据列值向行添加背景颜色?

问题描述

我正在使用反应智能数据表,根据列值要为行添加背景色

https://www.npmjs.com/package/react-smart-data-table

链接到我正在使用的智能数据表

Table header 
        ID: {
            text: 'ID',
            transform: value => `${value}`,
            className : 'column-Class',
        },
        name: {
            text: 'Name',
            transform: value => `${value}`,
        },
        Country: {
            text: 'Country',
            transform: value => `${value}`,
        }

我尝试通过添加className到列来添加背景颜色并且.css文件中存在css

标签: reactjsdatatable

解决方案


推荐阅读