Skip to content

Commit

Permalink
fix(formula): remove hide column dirty range
Browse files Browse the repository at this point in the history
  • Loading branch information
Dushusir committed Dec 6, 2024
1 parent d3a65b3 commit 9bdc494
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 36 deletions.
36 changes: 2 additions & 34 deletions packages/sheets-formula/src/controllers/active-dirty.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import type {
IRemoveRowsMutationParams,
IRemoveSheetMutationParams,
IReorderRangeMutationParams,
ISetColHiddenMutationParams,
ISetColVisibleMutationParams,
ISetRangeValuesMutationParams,
ISetRowHiddenMutationParams,
ISetRowVisibleMutationParams,
Expand All @@ -53,8 +51,6 @@ import {
RemoveRowMutation,
RemoveSheetMutation,
ReorderRangeMutation,
SetColHiddenMutation,
SetColVisibleMutation,
SetRangeValuesMutation,
SetRowHiddenMutation,
SetRowVisibleMutation,
Expand Down Expand Up @@ -99,7 +95,7 @@ export class ActiveDirtyController extends Disposable {

this._initialRowAndColumn();

this._initialHideRowAndColumn();
this._initialHideRow();

this._initialSheet();

Expand Down Expand Up @@ -229,7 +225,7 @@ export class ActiveDirtyController extends Disposable {
});
}

private _initialHideRowAndColumn() {
private _initialHideRow() {
this._activeDirtyManagerService.register(SetRowHiddenMutation.id, {
commandId: SetRowHiddenMutation.id,
getDirtyData: (command: ICommandInfo) => {
Expand Down Expand Up @@ -258,34 +254,6 @@ export class ActiveDirtyController extends Disposable {
};
},
});
this._activeDirtyManagerService.register(SetColHiddenMutation.id, {
commandId: SetColHiddenMutation.id,
getDirtyData: (command: ICommandInfo) => {
const params = command.params as ISetColHiddenMutationParams;
return {
dirtyRanges: this._getHideRowOrColumnMutation(params),
clearDependencyTreeCache: {
[params.unitId]: {
[params.subUnitId]: '1',
},
},
};
},
});
this._activeDirtyManagerService.register(SetColVisibleMutation.id, {
commandId: SetColVisibleMutation.id,
getDirtyData: (command: ICommandInfo) => {
const params = command.params as ISetColVisibleMutationParams;
return {
dirtyRanges: this._getHideRowOrColumnMutation(params),
clearDependencyTreeCache: {
[params.unitId]: {
[params.subUnitId]: '1',
},
},
};
},
});
}

private _initialSheet() {
Expand Down
4 changes: 2 additions & 2 deletions packages/sheets/src/controllers/basic-worksheet.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ export class BasicWorksheetController extends Disposable implements IDisposable
EmptyMutation,
SetRowHiddenMutation, // formula SUBTOTAL
SetRowVisibleMutation,
SetColHiddenMutation,
SetColVisibleMutation,
] as IMutation<object>[]).forEach((mutation) => {
this._commandService.registerCommand(mutation);
this._dataSyncPrimaryController?.registerSyncingMutations(mutation);
Expand Down Expand Up @@ -227,6 +225,8 @@ export class BasicWorksheetController extends Disposable implements IDisposable
SetBorderPositionCommand,
SetBorderStyleCommand,
SetColHiddenCommand,
SetColHiddenMutation,
SetColVisibleMutation,
SetColWidthCommand,
SetColDataCommand,
SetColDataMutation,
Expand Down

0 comments on commit 9bdc494

Please sign in to comment.