Skip to content

Commit

Permalink
chore: update store originalDataCfg type
Browse files Browse the repository at this point in the history
  • Loading branch information
1wkk committed Jul 27, 2023
1 parent 7591e13 commit 3ef4c64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/s2-core/src/common/interface/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface StoreKey {
// interaction state
interactionStateInfo: InteractionStateInfo;

originalDataCfg: S2DataConfig;
originalDataCfg: Partial<S2DataConfig>;

panelBBox: BBox;
// resize area group
Expand Down
2 changes: 1 addition & 1 deletion packages/s2-core/src/sheet-type/spread-sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,12 +371,12 @@ export abstract class SpreadSheet extends EE {
dataCfg: T extends true ? S2DataConfig : Partial<S2DataConfig>,
reset?: T,
) {
this.store.set('originalDataCfg', dataCfg);
if (reset) {
this.dataCfg = getSafetyDataConfig(dataCfg);
} else {
this.dataCfg = getSafetyDataConfig(this.dataCfg, dataCfg);
}
this.store.set('originalDataCfg', this.dataCfg);
// clear value ranger after each updated data cfg
clearValueRangeState(this);
}
Expand Down

0 comments on commit 3ef4c64

Please sign in to comment.