Skip to content

Commit

Permalink
fix: unobserve on sort
Browse files Browse the repository at this point in the history
  • Loading branch information
jajugoguma committed Dec 10, 2023
1 parent af44118 commit 795971c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/toast-ui.grid/src/dispatch/sort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Data, ViewRow, Row } from '@t/store/data';
import { SortingType } from '@t/store/column';
import { SortStateResetOption } from '@t/options';
import { findPropIndex, isUndefined } from '../helper/common';
import { notify } from '../helper/observable';
import { notify, unobservable } from '../helper/observable';
import { sortRawData } from '../helper/sort';
import { getEventBus } from '../event/eventBus';
import { updateRowNumber, setCheckedAllRows } from './data';
Expand Down Expand Up @@ -41,6 +41,10 @@ function sortData(store: Store) {
rawData.sort(sortRawData(sortedColumns));
data.viewData = createSoretedViewData(rawData);
}

data.rawData.forEach((rawRow) => {
unobservable(rawRow);
});
}

function setInitialSortState(data: Data) {
Expand Down

0 comments on commit 795971c

Please sign in to comment.