Skip to content

Commit

Permalink
feat: 暴露afterRealCellRender,这样能够更灵活的使用datacell
Browse files Browse the repository at this point in the history
  • Loading branch information
杨骥 committed Dec 2, 2022
1 parent 9250487 commit ee7aa33
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions packages/s2-core/src/cell/data-cell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,7 @@ export class DataCell extends BaseCell<ViewMeta> {
this.drawTextShape();
this.drawConditionIconShapes();
}
if (this.meta.isFrozenCorner) {
this.drawBorderShape();
}
this.drawBorderShape();
this.update();
}

Expand Down
1 change: 1 addition & 0 deletions packages/s2-core/src/common/interface/s2Options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export interface S2Options<T = TooltipContentType, P = Pagination>
S2PivotSheetOptions {
// custom data set
dataSet?: (spreadsheet: SpreadSheet) => BaseDataSet;
afterRealCellRender?: (spreadsheet: SpreadSheet) => void;
}

export interface S2RenderOptions {
Expand Down
3 changes: 3 additions & 0 deletions packages/s2-core/src/facet/base-facet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,9 @@ export abstract class BaseFacet {
);
});
this.preCellIndexes = indexes;
if (this.spreadsheet.options.afterRealCellRender) {
this.spreadsheet.options.afterRealCellRender(this.spreadsheet);
}
};

protected init() {
Expand Down

0 comments on commit ee7aa33

Please sign in to comment.