Skip to content

Commit

Permalink
fix(FileUpload): allow re-uploading the same file (#2199)
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed May 28, 2024
1 parent 0829a71 commit 2d82e41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-mirrors-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@razorpay/blade": patch
---

fix(FileUpload): allow re-uploading of the same file
3 changes: 3 additions & 0 deletions packages/blade/src/components/FileUpload/FileUpload.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ const _FileUpload: React.ForwardRefRenderFunction<BladeElementRef, FileUploadPro
handleFilesChange(inputFiles);
onChange?.({ name, fileList: allFiles });
}

// Reset the input value to allow re-selecting the same file
event.target.value = '';
};

return (
Expand Down

0 comments on commit 2d82e41

Please sign in to comment.