Skip to content

Commit

Permalink
📸 chore: update snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmclin2 committed Aug 30, 2023
1 parent 74016a8 commit 7dd5b3f
Show file tree
Hide file tree
Showing 3 changed files with 479 additions and 65 deletions.
4 changes: 2 additions & 2 deletions src/SortableList/store/listDataReducer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ describe('listDataReducer', () => {
it('从第 2 项移动到第 0 项', () => {
const data = listDataReducer(listData, {
type: 'moveItem',
activeIndex: 3,
targetIndex: 1,
activeIndex: 2,
overIndex: 0,
});
expect(data).toEqual([listData[2], listData[0], listData[1]]);
});
Expand Down
2 changes: 1 addition & 1 deletion src/SortableList/store/listDataReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { produce } from 'immer';
import merge from 'lodash.merge';
import { SortableListDispatchPayload } from '../type';

export const listDataReducer = (value: any[], getId, payload: SortableListDispatchPayload) => {
export const listDataReducer = (value: any[], payload: SortableListDispatchPayload) => {
switch (payload.type) {
case 'moveItem':
const { activeIndex, overIndex } = payload;
Expand Down
Loading

0 comments on commit 7dd5b3f

Please sign in to comment.