Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/s2-core/src/ui/sticky-header/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,19 @@ export class StickyHeaderController {
) => SpreadSheet;

this.stickyS2 = new SheetClass(this.stickyContainer, dataCfg, options);
this.syncTheme();
}

/**
* 同步主表主题到吸顶实例
*/
private syncTheme() {
if (!this.stickyS2) {
return;
}

this.stickyS2.setThemeCfg({ name: this.spreadsheet.themeName });
this.stickyS2.theme = this.spreadsheet.theme;
Comment thread
Alexzjt marked this conversation as resolved.
Resolved
}

/**
Expand Down Expand Up @@ -503,6 +516,7 @@ export class StickyHeaderController {

this.stickyS2.setDataCfg(dataCfg);
this.stickyS2.setOptions(options);
this.syncTheme();

// 调整画布大小到表头大小
const mainConfig = spreadsheet.getCanvasConfig();
Expand Down
Loading