don't show spinner when empty query is submitted (#128)
This commit is contained in:
parent
5cc46b4e11
commit
a3ed2036cb
|
@ -352,16 +352,20 @@ update path navKey result_type options decodeResultItemSource msg model =
|
||||||
)
|
)
|
||||||
|
|
||||||
QueryInputSubmit ->
|
QueryInputSubmit ->
|
||||||
( { model | result = RemoteData.Loading }
|
if model.query == Nothing || model.query == Just "" then
|
||||||
, createUrl
|
( model, Cmd.none )
|
||||||
path
|
|
||||||
model.channel
|
else
|
||||||
model.query
|
( { model | result = RemoteData.Loading }
|
||||||
model.show
|
, createUrl
|
||||||
0
|
path
|
||||||
model.size
|
model.channel
|
||||||
|> Browser.Navigation.pushUrl navKey
|
model.query
|
||||||
)
|
model.show
|
||||||
|
0
|
||||||
|
model.size
|
||||||
|
|> Browser.Navigation.pushUrl navKey
|
||||||
|
)
|
||||||
|
|
||||||
QueryResponse result ->
|
QueryResponse result ->
|
||||||
( { model | result = result }
|
( { model | result = result }
|
||||||
|
|
Loading…
Reference in a new issue