summaryrefslogtreecommitdiff
path: root/elm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-02-13 18:50:36 +0100
committerYorhel <git@yorhel.nl>2020-02-13 18:50:36 +0100
commitc4b43c9175650ee19f27c1f400660dd926f389b8 (patch)
treeadf82137fd2eebaf178f84716dc7ae2e2c4a456a /elm
parentdac3f16d9e8960c80077dc4d46cfad0747427af7 (diff)
Lib.Autocomplete: Don't try to autocomplete whitespace
Diffstat (limited to 'elm')
-rw-r--r--elm/Lib/Autocomplete.elm2
1 files changed, 1 insertions, 1 deletions
diff --git a/elm/Lib/Autocomplete.elm b/elm/Lib/Autocomplete.elm
index ec82bc12..2e321a87 100644
--- a/elm/Lib/Autocomplete.elm
+++ b/elm/Lib/Autocomplete.elm
@@ -173,7 +173,7 @@ update cfg msg model =
Key _ -> mod model
Input s ->
- if s == ""
+ if String.trim s == ""
then mod { model | value = s, loading = False, results = [] }
else ( { model | value = s, loading = True, wait = model.wait + 1 }
, Task.perform (always <| cfg.wrap <| Search <| model.wait + 1) (Process.sleep 500)