Skip to content

Commit

Permalink
Search.searchResultsFocus
Browse files Browse the repository at this point in the history
  • Loading branch information
hojberg committed Apr 22, 2024
1 parent 277f1a6 commit ada6f07
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Lib/Search.elm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module Lib.Search exposing
, searchResults
, searchResultsCycleNext
, searchResultsCyclePrev
, searchResultsFocus
, searchResultsNext
, searchResultsPrev
, toFailure
Expand Down Expand Up @@ -191,6 +192,16 @@ isSearching search_ =
False


searchResultsFocus : Search a -> Maybe a
searchResultsFocus s =
case s of
Success _ r ->
SearchResults.focus r

_ ->
Nothing


searchResultsPrev : Search a -> Search a
searchResultsPrev s =
case s of
Expand Down

0 comments on commit ada6f07

Please sign in to comment.