8000 [bugfix] allow onMove callback to return false · SortableJS/react-sortablejs@1b1946e · GitHub
[go: up one dir, main page]

Skip to content

Commit 1b1946e

Browse files
Wayne Van Sonandrewvmail
Wayne Van Son
authored andcommitted
[bugfix] allow onMove callback to return false
1 parent d6a4bb5 commit 1b1946e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"email": "waynevanson@gmail.com"
66
},
77
"license": "MIT",
8-
"version": "2.0.8",
8+
"version": "2.0.9",
99
"private": false,
1010
"main": "dist/index.js",
1111
"module": "dist/index.es.js",

src/react-sortable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
175175
const { onMove } = this.props;
176176
const defaultValue = evt.willInsertAfter || -1;
177177
if (!onMove) return defaultValue;
178-
return onMove(evt, originalEvt, this.sortable, store) || defaultValue;
178+
return onMove ? onMove(evt, originalEvt, this.sortable, store) : defaultValue;
179179
};
180180

181181
return {

0 commit comments

Comments
 (0)
0