Skip to content

Commit 3c6bf55

Browse files
authored
Merge pull request #7839 from enjeck/issue-7385
use filename when creating file via extension dropdown
2 parents 25b5383 + a0b2b9d commit 3c6bf55

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/packages/frontend/project/new/new-file-page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export default function NewFilePage(props: Props) {
100100
const [creatingFile, setCreatingFile] = useState<string>("");
101101

102102
async function createFile(ext?: string) {
103+
const filename = inputRef.current?.input.value;
103104
if (!filename) {
104105
return;
105106
}
@@ -123,6 +124,7 @@ export default function NewFilePage(props: Props) {
123124
}
124125

125126
function submit(ext?: string) {
127+
const filename = inputRef.current?.input.value;
126128
if (!filename) {
127129
// empty filename
128130
return;

0 commit comments

Comments
 (0)