Skip to content

Commit

Permalink
Add DATA_TRANSFER NativeType (#1120)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlong authored and darthtrevino committed Nov 6, 2018
1 parent b0364b1 commit c6d7649
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/react-dnd-html5-backend/src/NativeDragSources.ts
Expand Up @@ -22,6 +22,11 @@ const nativeTypesConfig: {
getData: (dataTransfer: any, matchesTypes: any) => any
}
} = {
[NativeTypes.DATA_TRANSFER]: {
exposeProperty: 'dataTransfer',
matchesTypes: ['Files', 'Url', 'text/uri-list', 'Text', 'text/plain'],
getData: (dataTransfer: any) => dataTransfer,
},
[NativeTypes.FILE]: {
exposeProperty: 'files',
matchesTypes: ['Files'],
Expand Down
1 change: 1 addition & 0 deletions packages/react-dnd-html5-backend/src/NativeTypes.ts
@@ -1,3 +1,4 @@
export const FILE = '__NATIVE_FILE__'
export const URL = '__NATIVE_URL__'
export const TEXT = '__NATIVE_TEXT__'
export const DATA_TRANSFER = '__NATIVE_DATA_TRANSFER__'

0 comments on commit c6d7649

Please sign in to comment.