Select Rich: API Table
class: LionSelectInvoker, lion-select-invoker
Fields
| Name | Privacy | Type | Default | Description | Inherited From |
|---|---|---|---|---|---|
active | public | boolean | false | LionButton | |
hostElement | public | LionSelectRich | null | null | The LionSelectRich element this invoker is part of. Will be set on connectedCallback of LionSelectRich | |
readOnly | public | boolean | false | When the connected LionSelectRich instance is readOnly, this should be reflected in the invoker as well | |
selectedElement | public | LionOption | null | null | The option element that is currently selected | |
singleOption | public | boolean | false | When the connected LionSelectRich instance has only one option, this should be reflected in the invoker as well | |
slots | public | ||||
type | public | string | 'button' | LionButton | |
_contentWrapperNode | protected |
Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
|---|---|---|---|---|---|
_afterTemplate | protected | ||||
_beforeTemplate | protected | ||||
_contentTemplate | protected | TemplateResult|Node[]|string|null | |||
_noSelectionTemplate | protected | To be overriden for a placeholder, used when `hasNoDefaultSelected` is true on the select rich | TemplateResult |
Attributes
| Name | Field | Inherited From |
|---|---|---|
selectedElement | selectedElement | |
hostElement | hostElement | |
readonly | readOnly | |
single-option | singleOption | |
active | active | LionButton |
type | type | LionButton |
class: LionSelectRich, lion-field-with-select
Fields
| Name | Privacy | Type | Default | Description | Inherited From |
|---|---|---|---|---|---|
config | public | Partial<OverlayConfig> | {} | Configure the many options of the `OverlayController` | OverlayMixin |
interactionMode | public | 'windows/linux'|'mac'|'auto' | 'auto' | Aligns behavior for ‘selectionFollowFocus’ and ‘navigateWithinInvoker’ with platform. When ‘auto’ (default), platform is automatically detected | |
navigateWithinInvoker | public | Boolean | false | When invoker has focus, up and down arrow keys changes active state of listbox, without opening overlay. | |
opened | public | boolean | false | If you add the opened attribute a dialog will be opened on page load. The invoker can be left out in case the user does not need to be able to reopen the dialog. | OverlayMixin |
singleOption | public | boolean | false | ||
slots | public | SlotsMap | |||
_arrowWidth | protected | number | 28 | ||
_feedbackConditionMeta | protected | LionListbox | |||
_focusableNode | protected | LionListbox | |||
_invokerNode | protected | LionSelectInvoker | |||
_overlayBackdropNode | protected | OverlayMixin | |||
_overlayContentNode | protected | OverlayMixin | |||
_overlayContentWrapperNode | protected | OverlayMixin | |||
_overlayInvokerNode | protected | The node that opens/closes this overlay. Resolved in a stable, declarative way (independent of the exact DOM order) by looking, in order, for: 1. a child with `[slot=“invoker”]` 2. any element in the same root that opts in via `[data-invoker]` and references this host by id (`for=“<id>”`) 3. a preceding sibling that opts in via `[data-invoker]` | OverlayMixin | ||
_overlayReferenceNode | protected | OverlayMixin | |||
_scrollTargetNode | protected |
Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
|---|---|---|---|---|---|
addFormElement | public | child: LionOption & FormControlHost, indexToInsertAt: Number | |||
close | public | Hides the overlay | OverlayMixin | ||
open | public | Shows the overlay | OverlayMixin | ||
removeFormElement | public | child: FormRegisteringHost | |||
repositionOverlay | public | Sometimes it’s needed to recompute Popper position of an overlay, for instance when we have an opened combobox and the surrounding context changes (the space consumed by the textbox increases vertically) | OverlayMixin | ||
toggle | public | Toggles the overlay | OverlayMixin | ||
_alignInvokerWidth | protected | Align invoker width with content width Make sure display is not set to “none” while calculating the content width | |||
_defineOverlay | protected | { contentNode, invokerNode, referenceNode, backdropNode, contentWrapperNode }, config: DefineOverlayConfig | OverlayController | OverlayMixin | |
_defineOverlayConfig | protected | OverlayConfig | OverlayMixin | ||
_getCheckedElements | protected | In the select disabled options are still going to a possible value for example when prefilling or programmatically setting it. | |||
_getInvokerNode | protected | Element|null | OverlayMixin | ||
_inputGroupInputTemplate | protected | ||||
_isPermanentlyDisconnected | protected | When we’re moving around in dom, disconnectedCallback gets called. Before we decide to teardown, let’s wait to see if we were not just moving nodes around. | Promise<boolean> | OverlayMixin | |
_listboxOnClick | protected | ||||
_listboxOnKeyDown | protected | ev: KeyboardEvent | |||
_noDefaultSelectedInheritsWidth | protected | With no selected element, we should override the inheritsReferenceWidth in most cases. By default, we will set it to ‘min’, and then set it back to what it was initially when something is selected. As a subclasser you can override this behavior. | |||
_onFormElementsChanged | protected | ||||
_onLabelClick | protected | ||||
_scrollIntoView | protected | el: HTMLElement, scrollTargetEl: HTMLElement | |||
_setOpenedWithoutPropertyEffects | protected | When the opened state is changed by an Application Developer,cthe OverlayController is requested to show/hide. It might happen that this request is not honoured (intercepted in before-hide for instance), so that we need to sync the controller state to this webcomponent again, preventing eternal loops. | newOpened: boolean | OverlayMixin | |
_setupListboxNode | protected | ||||
_setupOpenCloseListeners | protected | OverlayMixin | |||
_setupOverlayCtrl | protected | OverlayMixin | |||
_teardownListboxNode | protected | ||||
_teardownOpenCloseListeners | protected | OverlayMixin | |||
_teardownOverlayCtrl | protected | OverlayMixin |
Events
| Name | Type | Description | Inherited From |
|---|---|---|---|
blur | Event | ||
opened-changed | CustomEvent | OverlayMixin |
Attributes
| Name | Field | Inherited From |
|---|---|---|
navigate-within-invoker | navigateWithinInvoker | |
interaction-mode | interactionMode | |
single-option | singleOption | |
opened | opened | OverlayMixin |