Overview
Purpose: Manages a popup toggle part for a popup source.
This mixin works in the middle of the Elix render pipeline:
events → methods → setState ➞ render DOM → post-render
Expects the component to provide:
source
part, usually defined by PopupSource, in the component's template.
Provides the component with:
template
getter that injects a toggle into the popup'ssource
part.popupTogglePartType
state member and public property indicating the type of the toggle part.
Usage
import PopupSource from "elix/src/base/PopupSource.js";
import PopupToggleMixin from "elix/src/base/PopupToggleMixin.js";
class MyElement extends PopupToggleMixin(PopupSource) {}
API
The element defines the following shadow parts:
-
down-icon
: the icon shown in the toggle if the popup will open or close in the down direction -
popup-toggle
: the element that lets the user know they can open the popup, default type is UpDownToggle -
up-icon
: the icon shown in the toggle if the popup will open or close in the up direction
Used by classes AutoCompleteComboBox, ComboBox, DateComboBox, FilterComboBox, ListComboBox, PlainAutoCompleteComboBox, PlainComboBox, PlainDateComboBox, PlainDropdownList, PlainFilterComboBox, PlainListComboBox, and PlainMenuButton.
popup Toggle Part Type property
The class or tag used to create the popup-toggle
part – the
element that lets the user know they can open the popup.
Type: (component class constructor)|HTMLTemplateElement|string
Default: UpDownToggle