Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't allow to call connect* methods on the composite component elements
- Loading branch information
Showing
3 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
export default function createSourceConnector(backend) { | ||
return { | ||
dragSource: backend.connectDragSource.bind(backend), | ||
dragPreview: backend.connectDragPreview.bind(backend) | ||
dragSource: function connectDragSource(...args) { | ||
return backend.connectDragSource(...args); | ||
}, | ||
dragPreview: function connectDragPreview(...args) { | ||
return backend.connectDragPreview(...args); | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
export default function createTargetConnector(backend) { | ||
return { | ||
dropTarget: backend.connectDropTarget.bind(backend) | ||
dropTarget: function connectDropTarget(...args) { | ||
return backend.connectDropTarget(...args); | ||
} | ||
}; | ||
} |