Skip to content

Commit

Permalink
refactor: use common function updateCellContent
Browse files Browse the repository at this point in the history
  • Loading branch information
fangsmile committed Nov 30, 2023
1 parent af8859d commit 7e4944d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/vtable/src/ListTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ export class ListTable extends BaseTable implements ListTableAPI {
const { field } = this.internalProps.layoutMap.getBody(col, row);
this.dataSource.changeFieldValue(value, recordIndex, field, col, row, this);
// const cell_value = this.getCellValue(col, row);
this.scenegraph.updateCellValue(col, row);
this.scenegraph.updateCellContent(col, row);
if (this.widthMode === 'adaptive' || (this.autoFillWidth && this.getAllColsWidth() <= this.tableNoFrameWidth)) {
if (this.internalProps._widthResizedColMap.size === 0) {
//如果没有手动调整过行高列宽 则重新计算一遍并重新分配
Expand Down
2 changes: 1 addition & 1 deletion packages/vtable/src/PivotTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ export class PivotTable extends BaseTable implements PivotTableAPI {
}

// const cell_value = this.getCellValue(col, row);
this.scenegraph.updateCellValue(col, row);
this.scenegraph.updateCellContent(col, row);
if (this.widthMode === 'adaptive' || (this.autoFillWidth && this.getAllColsWidth() <= this.tableNoFrameWidth)) {
if (this.internalProps._widthResizedColMap.size === 0) {
//如果没有手动调整过行高列宽 则重新计算一遍并重新分配
Expand Down
8 changes: 4 additions & 4 deletions packages/vtable/src/scenegraph/scenegraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1593,8 +1593,8 @@ export class Scenegraph {
}
return 0;
}
/** 更新场景树某个单元格的值 */
updateCellValue(col: number, row: number) {
updateCell(col, row, this.table);
}
// /** 更新场景树某个单元格的值 */
// updateCellValue(col: number, row: number) {
// updateCell(col, row, this.table);
// }
}

0 comments on commit 7e4944d

Please sign in to comment.