Skip to content

Commit

Permalink
Added comments to default shouldCancelStart implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Clauderic Demers committed Sep 5, 2016
1 parent 63a494f commit 5ceb45d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SortableContainer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ export default function SortableContainer(WrappedComponent, config = {withRef: f
hideSortableGhost: true,
contentWindow: typeof window !== 'undefined' ? window : null,
shouldCancelStart: function (e) {
// Cancel sorting if the event target is an `input`, `textarea`, `select` or `option`
if (['input', 'textarea', 'select', 'option'].indexOf(e.target.tagName.toLowerCase()) !== -1) {
return true;
return true; // Return true to cancel sorting
}
},
lockToContainerEdges: false,
Expand Down

0 comments on commit 5ceb45d

Please sign in to comment.