mirror of
https://github.com/nunntom/elm-ui-select.git
synced 2024-11-30 02:06:45 +03:00
Elevate z-index when open
This commit is contained in:
parent
c539955edd
commit
5dd545f911
@ -58,15 +58,13 @@ toStyled_ attrs placement filteredOptions ({ select } as config) viewConfig =
|
|||||||
, Attributes.css
|
, Attributes.css
|
||||||
[ Css.position Css.relative
|
[ Css.position Css.relative
|
||||||
, Css.boxSizing Css.borderBox
|
, Css.boxSizing Css.borderBox
|
||||||
|
, if Model.isOpen select then
|
||||||
|
Css.zIndex (Css.int 21)
|
||||||
|
|
||||||
|
else
|
||||||
|
Css.batch []
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
{- , if Model.isOpen select then
|
|
||||||
[ Element.htmlAttribute <| Html.Attributes.style "z-index" "21" ]
|
|
||||||
|
|
||||||
else
|
|
||||||
[]
|
|
||||||
-}
|
|
||||||
, ViewEvents.updateFilteredOptions config.onChange config.itemToString select viewConfig filteredOptions
|
, ViewEvents.updateFilteredOptions config.onChange config.itemToString select viewConfig filteredOptions
|
||||||
|> List.map Attributes.fromUnstyled
|
|> List.map Attributes.fromUnstyled
|
||||||
]
|
]
|
||||||
@ -149,40 +147,6 @@ toStyled_ attrs placement filteredOptions ({ select } as config) viewConfig =
|
|||||||
|
|
||||||
else
|
else
|
||||||
Html.text ""
|
Html.text ""
|
||||||
|
|
||||||
{-
|
|
||||||
, Placement.toAttribute
|
|
||||||
(if viewConfig.positionFixed then
|
|
||||||
Placement.Below
|
|
||||||
|
|
||||||
else
|
|
||||||
placement
|
|
||||||
)
|
|
||||||
<|
|
|
||||||
(if viewConfig.positionFixed then
|
|
||||||
positionFixedEl placement (Model.toContainerElement select)
|
|
||||||
|
|
||||||
else
|
|
||||||
identity
|
|
||||||
)
|
|
||||||
<|
|
|
||||||
menuView
|
|
||||||
(defaultMenuAttrs
|
|
||||||
{ menuWidth = Model.toMenuMinWidth select
|
|
||||||
, maxWidth = viewConfig.menuMaxWidth
|
|
||||||
, menuHeight = Model.toMenuMaxHeight viewConfig.menuMaxHeight viewConfig.menuPlacement select
|
|
||||||
}
|
|
||||||
++ List.concatMap (\toAttrs -> toAttrs placement) viewConfig.menuAttributes
|
|
||||||
)
|
|
||||||
{ menuId = Model.toMenuElementId select
|
|
||||||
, toOptionId = Model.toOptionElementId select
|
|
||||||
, toOptionState = Model.toOptionState select
|
|
||||||
, onChange = config.onChange
|
|
||||||
, menuOpen = Model.isOpen select
|
|
||||||
, options = filteredOptions
|
|
||||||
, optionElement = Maybe.withDefault (defaultOptionElement config.itemToString) viewConfig.optionElement
|
|
||||||
}
|
|
||||||
-}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user