Skip to content

Commit 1d661f9

Browse files
authored
fix(useDropZone): remove file kind restriction (#4305)
1 parent 59f8c94 commit 1d661f9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/core/useDropZone/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,10 @@ export function useDropZone(
6565

6666
const checkValidity = (event: DragEvent) => {
6767
const items = Array.from(event.dataTransfer?.items ?? [])
68-
const types = items
69-
.filter(item => item.kind === 'file')
70-
.map(item => item.type)
68+
const types = items.map(item => item.type)
7169

7270
const dataTypesValid = checkDataTypes(types)
73-
const multipleFilesValid = multiple || items.filter(item => item.kind === 'file').length <= 1
71+
const multipleFilesValid = multiple || items.length <= 1
7472

7573
return dataTypesValid && multipleFilesValid
7674
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy