SiSelectLazyOptionsDirective documentation¶
import { SiSelectLazyOptionsDirective } from '@siemens/element-ng/select'; Input Properties¶
| Name | Type | Description |
|---|---|---|
| optionSource required ¶ | SelectOptionSource<T> | Lazy source that resolves selected values and provides the options displayed by the select. Implement |
Attributes and Methods¶
| Name | Type | Default | Description |
|---|---|---|---|
| (readonly)loading ¶ | WritableSignal<boolean> | false | {@inheritDoc SiSelectOptionsStrategy#loading} Implements SiSelectOptionsStrategy<T> |
| onFilter() ¶ | {@inheritDoc SiSelectOptionsStrategy.onFilter} Implements SiSelectOptionsStrategy<T> Parameters
| ||
| onValueChange() ¶ | (value: T[]) => void | {@inheritDoc SiSelectOptionsStrategy.onValueChange} Implements SiSelectOptionsStrategy<T> | |
| (readonly)rows ¶ | WritableSignal<SelectItem<T>[]> | [] | {@inheritDoc SiSelectOptionsStrategy#rows} Implements SiSelectOptionsStrategy<T> |
| (readonly)selectedRows ¶ | WritableSignal<SelectOption<T>[]> | [] | {@inheritDoc SiSelectOptionsStrategy#selectedRows} Implements SiSelectOptionsStrategy<T> |
Types Documentation¶
An interface to define a lazy option source for the SiSelectComponent. compareOptions ? This function is used to sort options. It is only called if the si-select was able to find all options without querying the option source. a : b : getAllOptions ? Get all available options. If provided, this will be called when no filter value is provided. Otherwise, si-select will only show the selected values. This function must be implemented if this source is used on a select without a filter. getOptionsForSearch ? Find options for a search value. It will never be called with an empty search value. This function must be implemented if this source is used on a si-select with a filter. getOptionsForValues Get options for the provided values. This is basically a resolver function, that resolves values to options. valuesEqual ? Function to check if two values are equal. This function must be implemented if the check on reference equality is not enough. For instance, when using objects as value.import type { SelectOptionSource } from '@siemens/element-ng/select';
(a: SelectOption<TValue>, b: SelectOption<TValue>) => number ¶
SelectOption<TValue> ¶ SelectOption<TValue> ¶ () => Observable<SelectItem<TValue>[]> ¶ (search: string) => Observable<SelectItem<TValue>[]> ¶ (values: TValue[]) => Observable<SelectOption<TValue>[]> ¶ (optionA: TValue, optionB: TValue) => boolean ¶
Alias for SelectOption or SelectGroupimport type { SelectItem } from '@siemens/element-ng/select';
A select option Whether this option is disabled. An optional icon. The color of an icon. A label to be shown for this option. Is optional if a custom template is provided or if the value should directly be rendered. label ? : An optional stacked icon. stackedIcon ? : The color of a stacked icon. stackedIconColor ? : Defines this to be an option. Used for typeahead functionality when filtering is disabled. If provided, this will be used, otherwise the innerText of the rendered element. The value if this option. It will be used for formControls and the value property of this import type { SelectOption } from '@siemens/element-ng/select';
TranslatableString ¶ string ¶ string ¶ si-select. The value will internally be checked on equality by using ===. So an app should either use string or ensure that same values are referentially equal.
Indicate loading state of the options. List of all rows that should be rendered in a selection list. rows : List of all options that are currently selected. Must be updated when onValueChange is called. selectedRows : onFilter ? This function is called when a user enters a filter query. It is expected that an implementation will update the • Unprocessed input by user in the filterInput field filterInput ? : onValueChange Is always called when the value changes. The implementation must update selectedRows when called.
Signal<readonly SelectItem<T>[]> ¶ Signal<readonly SelectOption<T>[]> ¶
(filterInput?: string) => void ¶ rows based on the query.
string ¶ (value: readonly T[]) => void ¶
A select option group An optional key to identify this group in a custom template. A label to be shown as header for this group. Is optional if a custom template is provided. label ? : All options that are part of this group. options : Defines this to be a group.import type { SelectGroup } from '@siemens/element-ng/select';
TranslatableString ¶ SelectOption<T>[] ¶
Represents a translatable string. This can either be a translation key, e.g. import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit. Equivalent to a normal string in usage and functionality.
Except where otherwise noted, content on this site is licensed under MIT License.