Reload search results on channel change (#80)

fixes #65
fixes #79
This commit is contained in:
Rok Garbas 2020-06-10 13:14:36 +02:00 committed by GitHub
parent bddb6c43a6
commit 7a9d4cd9d4
Failed to generate hash of commit

View file

@ -141,8 +141,18 @@ update path navKey msg model =
)
ChannelChange channel ->
( { model | channel = channel }
, Cmd.none
( { model
| channel = channel
, result = RemoteData.Loading
}
, createUrl
path
channel
model.query
model.showDetailsFor
0
model.size
|> Browser.Navigation.pushUrl navKey
)
QueryInput query ->
@ -151,7 +161,7 @@ update path navKey msg model =
)
QuerySubmit ->
( model
( { model | result = RemoteData.Loading }
, createUrl
path
model.channel