Skip to content

Commit

Permalink
Merge pull request #280 from berenddeboer/select-fixes
Browse files Browse the repository at this point in the history
v4 select fixes
  • Loading branch information
berenddeboer authored Dec 10, 2019
2 parents e5342df + d43783c commit 916ef4f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions demo/Demo.elm
Original file line number Diff line number Diff line change
Expand Up @@ -644,5 +644,6 @@ subscriptions model =
, Demo.Slider.subscriptions SliderMsg model.slider
, Demo.TabBar.subscriptions TabBarMsg model.tabbar
, Demo.ModalDrawer.subscriptions ModalDrawerMsg model.modalDrawer
, Demo.TextFields.subscriptions TextFieldMsg model.textfields
, Demo.TopAppBar.subscriptions TopAppBarMsg model.topAppBar
]
1 change: 1 addition & 0 deletions src/Internal/List/Implementation.elm
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ liView domId lift model config listItemIds focusedIndex index options children =
Options.apply li_summary
(Maybe.withDefault Html.li li_config.node)
[ listItemClass
, Options.id list_item_dom_id |> when (not rippled)
, tabindex tab_index |> when config.isInteractive
, cs "mdc-list-item--selected" |> when (config.isSingleSelectionList && is_selected && not config.useActivated)
, cs "mdc-list-item--activated" |> when (config.isSingleSelectionList && is_selected && config.useActivated)
Expand Down
2 changes: 1 addition & 1 deletion src/Internal/Menu/Implementation.elm
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ menu domId lift model options ulNode =
, when (model.animating && not config.quickOpen) <|
if model.open then
cs "mdc-menu-surface--animating-open"

else
cs "mdc-menu-surface--animating-closed"

, -- Note: .mdc-menu--open has to be added one frame after
-- .mdc-menu-surface--animating-open has been set, except when
-- quickly opening:
Expand Down
7 changes: 1 addition & 6 deletions src/Internal/Select/Implementation.elm
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,7 @@ update lift msg model =
( Nothing, Cmd.none )

OpenMenu menuIndex ->
( Nothing
, Cmd.batch
[ Helpers.cmd ( lift (MenuMsg Menu.Open) )
, Task.attempt (\_ -> lift NoOp) (Browser.Dom.focus menuIndex)
]
)
( Nothing, Helpers.cmd ( lift (MenuMsg Menu.Open) ) )

ToggleMenu ->
update lift (MenuMsg Menu.Toggle) model
Expand Down

0 comments on commit 916ef4f

Please sign in to comment.