Skip to content

Commit

Permalink
Reload search results on channel change
Browse files Browse the repository at this point in the history
fixes #65
fixes #79
  • Loading branch information
garbas committed Jun 10, 2020
1 parent bddb6c4 commit 3dd7372
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/Search.elm
Expand Up @@ -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 ->
Expand All @@ -151,7 +161,7 @@ update path navKey msg model =
)

QuerySubmit ->
( model
( { model | result = RemoteData.Loading }
, createUrl
path
model.channel
Expand Down

0 comments on commit 3dd7372

Please sign in to comment.