Skip to content

Commit

Permalink
fix: append filename to text input
Browse files Browse the repository at this point in the history
Instead of clobbering the input text area just append the file path
at the end of the input.

This could be more clever by tracking where the cursor _was_ and inserting
the text there, but this seems better than just deleting the text.

Fixes block#1179
  • Loading branch information
mhickman committed Feb 13, 2025
1 parent 07b89c8 commit 31fb2de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/desktop/src/components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default function Input({
const handleFileSelect = async () => {
const path = await window.electron.selectFileOrDirectory();
if (path) {
setValue(path);
setValue(value + path);
textAreaRef.current?.focus();
}
};
Expand Down

0 comments on commit 31fb2de

Please sign in to comment.