Skip to content

Commit aa1d5a4

Browse files
author
Robin Franken
committed
Button will now be canceled in SortableContainer
Added the buttuon to `shouldCancelStart` to allow buttons to be clicked within SortableContainers.
1 parent 1260f22 commit aa1d5a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SortableContainer/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function sortableContainer(WrappedComponent, config = {withRef: f
3737
contentWindow: typeof window !== 'undefined' ? window : null,
3838
shouldCancelStart: function (e) {
3939
// Cancel sorting if the event target is an `input`, `textarea`, `select` or `option`
40-
if (['input', 'textarea', 'select', 'option'].indexOf(e.target.tagName.toLowerCase()) !== -1) {
40+
if (['input', 'textarea', 'select', 'option', 'button'].indexOf(e.target.tagName.toLowerCase()) !== -1) {
4141
return true; // Return true to cancel sorting
4242
}
4343
},

0 commit comments

Comments
 (0)