Don't scroll when loading more items

This commit is contained in:
Eike Kettner
2020-06-24 00:03:58 +02:00
parent b8558d6837
commit 43b18db76a
2 changed files with 15 additions and 26 deletions

View File

@ -76,21 +76,10 @@ update _ msg model =
else
let
firstNew =
Data.Items.first list
scrollCmd =
case firstNew of
Just item ->
Ports.scrollToElem item.id
Nothing ->
Cmd.none
newModel =
{ model | results = Data.Items.concat model.results list }
in
( newModel, scrollCmd, Nothing )
( newModel, Cmd.none, Nothing )
SelectItem item ->
( model, Cmd.none, Just item )