src/ui/lookup/services/smart-lookup-multiselect.service.ts
Component-scoped service that holds the lookup multi-selection state and
the pure value helpers consumed by SmartLookupComponent. Provided
per-component via providers: [SmartLookupMultiSelectService] so each
lookup instance has its own state. Intentionally free of DOM, @ViewChild
and @Output concerns - those stay in the component.
Properties |
|
Methods |
| isMultiValueInput | ||||||||
isMultiValueInput(text: any)
|
||||||||
|
Returns true when multi-selection is enabled and the supplied text holds the delimiter, i.e. it represents multiple values.
Parameters :
Returns :
boolean
|
| serialize | ||||||||
serialize(values: string[])
|
||||||||
|
Serializes selected chip display values into the delimited model string.
Parameters :
Returns :
string
|
| setInputs | ||||||
setInputs(inputs: SmartLookupMultiSelectInputs)
|
||||||
|
Push the latest input values into the service. Only the keys present on
Parameters :
Returns :
void
|
| toChipValues | ||||||||
toChipValues(model: any)
|
||||||||
|
Splits a delimited model value into the individual chip display values, dropping empty segments. Returns an empty array when there is no value.
Parameters :
Returns :
string[]
|
| toDisplayValues | ||||||||||||
toDisplayValues(items: any[], displayField: string)
|
||||||||||||
|
Maps fetched lookup records to plain display strings (via the binding's display field) for the multiselect dropdown data. Feeding strings rather than record objects keeps chips rendering even when a value is not present in the freshly filtered data.
Parameters :
Returns :
string[]
|
| Readonly enabled |
Type : Signal<boolean>
|
Default value : computed(() => !!this._multiple())
|
|
True when multi-selection (chip mode) is enabled. |