Skip to content

Commit

Permalink
fix(numfmt): numfmt not render after auto fill
Browse files Browse the repository at this point in the history
  • Loading branch information
Gggpound committed Jun 25, 2024
1 parent 3583fe5 commit 5d0fcb8
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
* limitations under the License.
*/

import type { ICellData, ICellDataForSheetInterceptor,
Workbook } from '@univerjs/core';
import type {
ICellData,
ICellDataForSheetInterceptor,
Workbook,
} from '@univerjs/core';
import {
CellValueType,
Disposable,
Expand All @@ -29,8 +32,8 @@ import {
ThemeService,
UniverInstanceType,
} from '@univerjs/core';
import type { ISetNumfmtMutationParams } from '@univerjs/sheets';
import { INTERCEPTOR_POINT, INumfmtService, SetNumfmtMutation, SheetInterceptorService } from '@univerjs/sheets';
import type { ISetNumfmtMutationParams, ISetRangeValuesMutationParams } from '@univerjs/sheets';
import { INTERCEPTOR_POINT, INumfmtService, SetNumfmtMutation, SetRangeValuesMutation, SheetInterceptorService } from '@univerjs/sheets';
import { Inject } from '@wendellhu/redi';

import { of, skip, switchMap } from 'rxjs';
Expand Down Expand Up @@ -112,6 +115,13 @@ export class SheetsNumfmtCellContentController extends Disposable {
});
});
});
} else if (commandInfo.id === SetRangeValuesMutation.id) {
const params = commandInfo.params as ISetRangeValuesMutationParams;
new ObjectMatrix(params.cellValue).forValue((row, col, value) => {
if (value?.s) {
renderCache.realDeleteValue(row, col);
}
});
}
}));

Expand Down

0 comments on commit 5d0fcb8

Please sign in to comment.