如何在反应虚拟化MultiGrid中省略列?

时间:2019-03-26 15:27:04

标签: reactjs react-virtualized

使用带有AutoSizer的react-virtualized MultiGrid,是否有办法动态地从数据集中省略一列?我基本上复制了示例,并设置了_cellRenderer以在某种条件下跳过一列,但是看起来该列仍在代码中:

_cellRenderer({columnIndex, key, rowIndex, style}) {
    let retVal = '';
     if(rowIndex === 1 && columnIndex === 5){
        retVal = null;
    } else {
        retVal = (<div className={styles.Cell} key={key} style={style}>
            {columnIndex}, {rowIndex}
        </div>)
    }

    return (retVal);
}

Missing Column between 6:00 and 7:00 should collapse

0 个答案:

没有答案