Skip to content

Commit

Permalink
fix: ドラッグ&ドロップ時に選択したファイルがFormDataに格納されるようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroki0525 committed Sep 30, 2024
1 parent 9427a32 commit 9280d91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/smarthr-ui/src/components/DropZone/DropZone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ export const DropZone = forwardRef<HTMLInputElement, DropZoneProps & ElementProp
overrideEventDefault(e)
setFilesDraggedOver(false)
onSelectFiles(e, e.dataTransfer.files)
if (fileRef.current) {
fileRef.current.files = e.dataTransfer.files
}
},
[setFilesDraggedOver, onSelectFiles],
)
Expand Down

0 comments on commit 9280d91

Please sign in to comment.