Handle empty mountpoint input (#4388)
This commit is contained in:
parent
d57709cb2f
commit
f37ae8b282
|
|
@ -825,6 +825,12 @@ class InputScreen(BaseScreen[str]):
|
||||||
|
|
||||||
self.query_one('#input-failure', Label).update(failure_out)
|
self.query_one('#input-failure', Label).update(failure_out)
|
||||||
else:
|
else:
|
||||||
|
input_value = event.value
|
||||||
|
|
||||||
|
if not input_value and not self._allow_skip:
|
||||||
|
self.query_one('#input-failure', Label).update(tr('Input cannot be empty'))
|
||||||
|
return
|
||||||
|
|
||||||
_ = self.dismiss(Result(ResultType.Selection, _data=event.value))
|
_ = self.dismiss(Result(ResultType.Selection, _data=event.value))
|
||||||
|
|
||||||
def on_input_changed(self, event: Input.Changed) -> None:
|
def on_input_changed(self, event: Input.Changed) -> None:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue