mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-27 13:02:42 +03:00
Wrap selections
This commit is contained in:
parent
6f2c3d1550
commit
34e4b553ba
@ -199,12 +199,22 @@ keyEvents { focusAndSelect, tabs } thisTab =
|
||||
|
||||
goToNextTab : Maybe msg
|
||||
goToNextTab =
|
||||
List.foldl findAdjacentTab ( False, Nothing ) activeTabs
|
||||
List.foldl findAdjacentTab
|
||||
( False
|
||||
, -- if there is no adjacent tab, default to the first tab
|
||||
Maybe.map onFocus (List.head activeTabs)
|
||||
)
|
||||
activeTabs
|
||||
|> Tuple.second
|
||||
|
||||
goToPreviousTab : Maybe msg
|
||||
goToPreviousTab =
|
||||
List.foldr findAdjacentTab ( False, Nothing ) activeTabs
|
||||
List.foldr findAdjacentTab
|
||||
( False
|
||||
, -- if there is no adjacent tab, default to the last tab
|
||||
Maybe.map onFocus (List.head (List.reverse activeTabs))
|
||||
)
|
||||
activeTabs
|
||||
|> Tuple.second
|
||||
in
|
||||
List.filterMap identity
|
||||
|
Loading…
Reference in New Issue
Block a user