diff --git a/src/ElasticSearch.elm b/src/ElasticSearch.elm index b997e41..4ea676b 100644 --- a/src/ElasticSearch.elm +++ b/src/ElasticSearch.elm @@ -126,15 +126,16 @@ update path navKey msg model = ) ShowDetails selected -> - ( { model - | showDetailsFor = - if model.showDetailsFor == Just selected then - Nothing + ( model + , createUrl path + model.query + (if model.showDetailsFor == Just selected then + Nothing - else - Just selected - } - , Cmd.none + else + Just selected + ) + |> Browser.Navigation.pushUrl navKey )