Skip to content

Commit 2c121ce

Browse files
authored
Update main.jsx
1 parent 97977ee commit 2c121ce

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

frameworks/keyed/fre/src/main.jsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,7 @@ function listReducer(state, action) {
9393
case "CLEAR":
9494
return { data: [], selected: 0 }
9595
case "SWAP_ROWS":
96-
return data.length > 8
97-
? {
98-
data: [
99-
data[0],
100-
data[8],
101-
...data.slice(2, 8),
102-
data[1],
103-
data[9],
104-
],
105-
}
106-
: state
96+
return data.length > 998 ? { data: [data[0], data[998], ...data.slice(2, 998), data[1], data[999]], selected } : state
10797
case "REMOVE":
10898
const idx = data.findIndex((d) => d.id === action.id)
10999
return { data: [...data.slice(0, idx), ...data.slice(idx + 1)], selected }

0 commit comments

Comments
 (0)