fix: number cell update flashes with old content (#7605)

This commit is contained in:
Richard Shiue 2025-03-25 11:07:46 +08:00 committed by GitHub
parent 46532a861f
commit 72d660f1ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,15 +47,6 @@ class NumberCellBloc extends Bloc<NumberCellEvent, NumberCellState> {
if (state.content != text) { if (state.content != text) {
emit(state.copyWith(content: text)); emit(state.copyWith(content: text));
await cellController.saveCellData(text); await cellController.saveCellData(text);
// If the input content is "abc" that can't parsered as number then the data stored in the backend will be an empty string.
// So for every cell data that will be formatted in the backend.
// It needs to get the formatted data after saving.
add(
NumberCellEvent.didReceiveCellUpdate(
cellController.getCellData(),
),
);
} }
}, },
); );