简体   繁体   English

如何在 react-bootstrap-table2 的边框上设置图标

[英]How can be an icon set on the border of the react-bootstrap-table2

Trying to add a simple dot right on the end of the row in react-bootstrap-table but with no luck.试图在 react-bootstrap-table 行的末尾添加一个简单的点,但没有运气。 My icon is in the last column in the row.我的图标位于该行的最后一列。

Icon is set in a div in an blueDotFormatter in a dummy field图标设置在虚拟字段中 blueDotFormatter 的 div 中

   {
        dataField: 'blueDot',
        isDummyField: true,
        formatter: blueDotFormatter,
        headerStyle: (colum, colIndex) => {
            return {
                width: '1%',
                paddingRight: '0',
                marginRight: '0'
            };
        }

td's style is always overriding my style and i can not set the icon straight on the border of the row. td 的样式始终覆盖我的样式,我无法将图标直接设置在行的边框上。

const blueDotFormatter = () => {

    return (
        <div className={"blue-dot blue-dot-"}>
            <img alt="image" src={blueDotIcon}/>
        </div>
    )
};

Is it possible?是否可以?

如果有人正在寻找 - 将宽度设置为 0.8% 甚至 0.89% 会使图像进入边框。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM