Skip to content

Commit

Permalink
Fix blurring rename field
Browse files Browse the repository at this point in the history
  • Loading branch information
carrotmargh committed Jan 14, 2023
1 parent 2df685a commit aa5ee4a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/src/main/kotlin/components/FileComponent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ val FileComponent = fc<FileComponentProps>("FileComponent") { props ->
if (props.file.fileName != newName) {
if (validateFilename(newName)) {
props.renameFile(props.file, newName)
(event.target as HTMLInputElement).blur()
} else {
showToast("Invalid filename")
}
} else {
(event.target as HTMLInputElement).blur()
}
}
Expand Down

0 comments on commit aa5ee4a

Please sign in to comment.