Skip to content

Commit

Permalink
fix: allow spaces in rename modal (#1795)
Browse files Browse the repository at this point in the history
Closes #1775 my moving fix from #1718 to correct place
  • Loading branch information
lidel authored May 21, 2021
1 parent 4dc0c1a commit dd2b161
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/text-input-modal/TextInputModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TextInputModal extends React.Component {
}

onChange = (event) => {
let val = event.target.value.trim()
let val = event.target.value

if (this.props.onChange) {
val = this.props.onChange(val)
Expand Down
2 changes: 1 addition & 1 deletion src/files/modals/add-by-path-modal/AddByPathModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function ByPathModal ({ t, tReady, onCancel, onSubmit, className, ...props }) {

return (
<TextInputModal
validate={(p) => validatePath(p)}
validate={(p) => validatePath(p.trim())}
onSubmit={(p) => onSubmit(p.trim())}
onChange={(p) => p.trimStart()}
onCancel={onCancel}
Expand Down

0 comments on commit dd2b161

Please sign in to comment.