Wizard: trim paths in UI

#KT-36163 fixed
This commit is contained in:
Ilya Kirillov
2020-02-10 16:27:31 +03:00
parent 152def62cb
commit 0123dbce21
@@ -31,7 +31,7 @@ class PathFieldComponent(
onValueUpdate
) {
override val uiComponent: TextFieldWithBrowseButton = TextFieldWithBrowseButton(
textField(initialValue?.toString().orEmpty()) { path -> fireValueUpdated(Paths.get(path)) }
textField(initialValue?.toString().orEmpty()) { path -> fireValueUpdated(Paths.get(path.trim())) }
).apply {
addBrowseFolderListener(
TextBrowseFolderListener(
@@ -45,5 +45,5 @@ class PathFieldComponent(
uiComponent.text = newValue.toString()
}
override fun getUiValue(): Path = Paths.get(uiComponent.text)
override fun getUiValue(): Path = Paths.get(uiComponent.text.trim())
}