Skip to content

Commit

Permalink
fix: wrong range of rowkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
jajugoguma committed Sep 18, 2023
1 parent 34f9c8f commit dbe4d41
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions packages/toast-ui.grid/src/query/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,21 +372,8 @@ export function getCheckStateChangedRowkeysInRange(
checkState: boolean,
range: [number, number]
) {
const { data, column, id } = store;
const { clickedCheckboxRowkey, filteredRawData } = data;
const prevCheckedCheckboxRowIndex = findIndexByRowKey(
data,
column,
id,
clickedCheckboxRowkey,
isFiltered(data)
);

if (range[0] === prevCheckedCheckboxRowIndex) {
range = [range[0] + 1, range[1]];
} else if (range[1] === prevCheckedCheckboxRowIndex) {
range = [range[0], range[1] - 1];
}
const { data } = store;
const { filteredRawData } = data;

const rowKeys: RowKey[] = [];
for (let i = range[0]; i < range[1]; i += 1) {
Expand Down

0 comments on commit dbe4d41

Please sign in to comment.