reactjs - react-virtualized table 在更新时更改单元格颜色
问题描述
我使用 react-virtualized Table 实时呈现数据。
render() {
...
return(
<div>
<AutoSizer disableHeight>
{({width}) => (
<Table
ref="Table"
headerClassName={styles.headerColumn}
height={height}
noRowsRenderer={this._noRowsRenderer}
rowHeight={ rowHeight}
rowGetter={rowGetter}
rowCount={rowCount}
scrollToIndex={scrollToIndex}
sort={this._sort}
sortBy={sortBy}
sortDirection={sortDirection}
width={width}>
<Column
label="Index"
cellDataGetter={({rowData}) => rowData.index}
dataKey="index"
disableSort={!this._isSortEnabled()}
width={60}
/>
<Column
dataKey="name"
disableSort={!this._isSortEnabled()}
headerRenderer={this._headerRenderer}
width={90}
/>
</Table>
)}
</AutoSizer>
</div>
);
}
我想为已更新的单元格添加发光效果。发光效果可以用css动画实现
@-webkit-keyframes glow-effect {
from {background-color: red;}
to {background-color: yellow;}
}
我怎样才能知道最近更新了哪些单元格,以便我可以使用发光效果 css 类来渲染它们?
解决方案
推荐阅读
- javascript - 如何以编程方式更改 EXTJS 中树列表中的 rowCls?
- python - openpyxl 保存时删除数据
- python - 我希望我的代码检查这两个条件是否与输入框中输入的相同
- python - Python 2.7 到 EXE - 无法安装 pyinstaller
- spring-boot - 如何通过服务测试获得超过 0% 的声纳覆盖率
- node.js - .findall() 在模型中应用 where 条件后给出所有内容
- c++ - 使用 C 时间函数来测量时间:它们是否抗代码重新排序?
- django - Celery Beat 在启动时发送任务(在预定时间之前)
- javascript - 从方法中获取目标元素(无事件)
- python-3.x - 计算字符串,得到一个空集,为什么?(蟒蛇3)