Skip to content

Commit d9d3ae6

Browse files
abdusabriCopilot
andauthored
Clear input file selector
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 2c30fb1 commit d9d3ae6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/components/FileSelector.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ const FileSelector: React.FC<FileSelectorProps> = React.memo(
2222
);
2323

2424
const handleTriggerFileSelect = useCallback(() => {
25-
inputRef.current?.click();
25+
if (inputRef.current) {
26+
inputRef.current.value = '';
27+
inputRef.current.click();
28+
}
2629
}, []);
2730

2831
return (

0 commit comments

Comments
 (0)