本帖最后由 Richard.Huang 于 2023-10-19 11:26 编辑
产品:SpreadJS
版本:V14.2
数据分组后,插入一条新数据 刷新展示异常
分组节点展开插入正常,收缩插入后分组刷新异常,
插入新记录后,进行数据刷新,刷新代码:
sheet.setDataSource(data);
spread.suspendPaint();
if (data) {
data.forEach((item, index) => {
sheet.getCell(index, _options.columnIndex || 0).textIndent(item.f_level);
callback && callback(item, index)
})
}
sheet.outlineColumn.options({
columnIndex: 0,
showImage: true,
showIndicator: true,
expandIndicator: require('static/images/tree-plus2.gif').default,
collapseIndicator: require('static/images/tree-minus2.gif').default,
..._options
});
sheet.showRowOutline(_options.showRowOutline || false);
sheet.outlineColumn.refresh();
spread.resumePaint();
节点展开插入正常
节点收缩后 展示错误
|
|