Skip to content

@serenity-is/corelib / ServiceLookupEditor

Class: ServiceLookupEditor<P, TItem>

Defined in: src/ui/editors/servicelookupeditor.ts:275

An editor that renders a combobox over service list results.

Extends

Type Parameters

P

P extends ServiceLookupEditorOptions = ServiceLookupEditorOptions

Widget props type.

TItem

TItem = any

The item type.

Constructors

Constructor

new ServiceLookupEditor<P, TItem>(props): ServiceLookupEditor<P, TItem>

Defined in: src/ui/editors/servicelookupeditor.ts:282

Creates a service lookup editor.

Parameters

props

EditorProps<P>

Widget props.

Returns

ServiceLookupEditor<P, TItem>

Overrides

ServiceLookupEditorBase.constructor

Properties

protected cascadeLink: CascadedWidgetLink<Widget<any>>

Defined in: src/ui/editors/comboboxeditor.tsx:810

Inherited from

ServiceLookupEditorBase.cascadeLink


domNode

readonly domNode: HTMLInputElement

Defined in: src/ui/editors/comboboxeditor.tsx:77

The hidden input element that backs the combobox editor.

Inherited from

ServiceLookupEditorBase.domNode


idPrefix

readonly idPrefix: string

Defined in: src/ui/widgets/widget.ts:22

The id prefix used for this widget's child element ids.

Inherited from

ServiceLookupEditorBase.idPrefix


lastCreateTerm

protected lastCreateTerm: string

Defined in: src/ui/editors/comboboxeditor.tsx:82

Inherited from

ServiceLookupEditorBase.lastCreateTerm


onInitNewEntity()

onInitNewEntity: (entity) => void

Defined in: src/ui/editors/comboboxeditor.tsx:1089

Callback invoked to initialize a new entity for in-place add.

Parameters

entity

TItem

Returns

void

Inherited from

ServiceLookupEditorBase.onInitNewEntity


openDialogAsPanel

openDialogAsPanel: boolean

Defined in: src/ui/editors/comboboxeditor.tsx:1224

Whether the in-place add dialog opens as a panel.

Inherited from

ServiceLookupEditorBase.openDialogAsPanel


options

protected readonly options: WidgetProps<EditorProps<ServiceLookupEditorOptions>>

Defined in: src/ui/widgets/widget.ts:18

The widget's options/props.

Inherited from

ServiceLookupEditorBase.options


uniqueName

readonly uniqueName: string

Defined in: src/ui/widgets/widget.ts:20

A unique name for this widget instance, used for event namespacing.

Inherited from

ServiceLookupEditorBase.uniqueName


[typeInfo]

static [typeInfo]: EditorTypeInfo<"Serenity.">

Defined in: src/ui/editors/servicelookupeditor.ts:276

Overrides

ServiceLookupEditorBase.[typeInfo]


isComponent

readonly static isComponent: true = true

Defined in: src/ui/widgets/widget.ts:334

Inherited from

ServiceLookupEditorBase.isComponent

Accessors

cascadeField

Get Signature

get cascadeField(): string

Defined in: src/ui/editors/comboboxeditor.tsx:880

Returns the cascade field name.

Returns

string

The cascade field.

Set Signature

set cascadeField(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:894

Sets the cascade field name.

Parameters
value

string

The field name used for cascading.

Returns

void

Inherited from

ServiceLookupEditorBase.cascadeField


cascadeFrom

Get Signature

get cascadeFrom(): string

Defined in: src/ui/editors/comboboxeditor.tsx:847

Returns the cascade-from parent id.

Returns

string

The parent id.

Set Signature

set cascadeFrom(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:864

Sets the cascade-from parent id.

Parameters
value

string

The parent editor id to cascade from.

Returns

void

Inherited from

ServiceLookupEditorBase.cascadeFrom


cascadeValue

Get Signature

get cascadeValue(): any

Defined in: src/ui/editors/comboboxeditor.tsx:910

Returns the cascade value.

Returns

any

The cascade value.

Set Signature

set cascadeValue(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:928

Sets the cascade value.

Parameters
value

any

The cascade value to filter by.

Returns

void

Inherited from

ServiceLookupEditorBase.cascadeValue


element

Get Signature

get element(): Fluent

Defined in: src/ui/widgets/widget.ts:82

Returns a Fluent(this.domNode) object

Returns

Fluent

Inherited from

ServiceLookupEditorBase.element


filterField

Get Signature

get filterField(): string

Defined in: src/ui/editors/comboboxeditor.tsx:944

Returns the filter field name.

Returns

string

The filter field.

Set Signature

set filterField(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:958

Sets the filter field name.

Parameters
value

string

The field name used for filtering.

Returns

void

Inherited from

ServiceLookupEditorBase.filterField


filterValue

Get Signature

get filterValue(): any

Defined in: src/ui/editors/comboboxeditor.tsx:974

Returns the filter value.

Returns

any

The filter value.

Set Signature

set filterValue(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:992

Sets the filter value.

Parameters
value

any

The filter value to apply.

Returns

void

Inherited from

ServiceLookupEditorBase.filterValue


itemById

Get Signature

get protected itemById(): object

Defined in: src/ui/editors/comboboxeditor.tsx:391

Returns

object

Set Signature

set protected itemById(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:398

Parameters
value
Returns

void

Inherited from

ServiceLookupEditorBase.itemById


items

Get Signature

get items(): ComboboxItem<TItem>[]

Defined in: src/ui/editors/comboboxeditor.tsx:372

Returns the items in the editor.

Returns

ComboboxItem<TItem>[]

The items.

Set Signature

set items(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:381

Sets the items in the editor.

Parameters
value

ComboboxItem<TItem>[]

The combobox items to set.

Returns

void

Inherited from

ServiceLookupEditorBase.items


props

Get Signature

get props(): WidgetProps<P>

Defined in: src/ui/widgets/widget.ts:307

Returns the widget's props/options.

Returns

WidgetProps<P>

Inherited from

ServiceLookupEditorBase.props


readOnly

Get Signature

get readOnly(): boolean

Defined in: src/ui/editors/editorwidget.ts:42

Returns whether the editor is read-only.

Returns

boolean

True when read-only.

Set Signature

set readOnly(value): void

Defined in: src/ui/editors/editorwidget.ts:48

Sets whether the editor is read-only.

Parameters
value

boolean

Returns

void

Inherited from

ServiceLookupEditorBase.readOnly


selectedItem

Get Signature

get selectedItem(): TItem

Defined in: src/ui/editors/comboboxeditor.tsx:693

Returns the currently selected item.

Returns

TItem

The selected item, or null.

Inherited from

ServiceLookupEditorBase.selectedItem


selectedItems

Get Signature

get selectedItems(): TItem[]

Defined in: src/ui/editors/comboboxeditor.tsx:707

Returns the currently selected items.

Returns

TItem[]

The selected items.

Inherited from

ServiceLookupEditorBase.selectedItems


text

Get Signature

get text(): string

Defined in: src/ui/editors/comboboxeditor.tsx:767

Returns the display text of the current selection.

Returns

string

The comma-joined display text of the selected item(s).

Inherited from

ServiceLookupEditorBase.text


value

Get Signature

get value(): string

Defined in: src/ui/editors/comboboxeditor.tsx:664

Returns the current value.

Returns

string

The value.

Set Signature

set value(v): void

Defined in: src/ui/editors/comboboxeditor.tsx:685

Sets the current value.

Parameters
v

string

The single value to set.

Returns

void

Inherited from

ServiceLookupEditorBase.value


values

Get Signature

get values(): string[]

Defined in: src/ui/editors/comboboxeditor.tsx:734

Returns the current values.

Returns

string[]

The values.

Set Signature

set values(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:748

Sets the current values.

Parameters
value

string[]

The array of selected values to set.

Returns

void

Inherited from

ServiceLookupEditorBase.values

Methods

abortPendingQuery()

protected abortPendingQuery(): void

Defined in: src/ui/editors/comboboxeditor.tsx:262

Aborts any pending search query.

Returns

void

Inherited from

ServiceLookupEditorBase.abortPendingQuery


addCssClass()

protected addCssClass(): void

Defined in: src/ui/widgets/widget.ts:89

Adds the widget's CSS class to its DOM node.

Returns

void

Inherited from

ServiceLookupEditorBase.addCssClass


addInplaceCreate()

protected addInplaceCreate(addTitle, editTitle): void

Defined in: src/ui/editors/comboboxeditor.tsx:449

Adds the in-place create button.

Parameters

addTitle

string

Title for the add button.

editTitle

string

Title for the edit button.

Returns

void

Inherited from

ServiceLookupEditorBase.addInplaceCreate


addItem()

addItem(item): void

Defined in: src/ui/editors/comboboxeditor.tsx:420

Adds an item to the editor.

Parameters

item

ComboboxItem<TItem>

The item to add.

Returns

void

Inherited from

ServiceLookupEditorBase.addItem


addOption()

addOption(key, text, source?, disabled?): void

Defined in: src/ui/editors/comboboxeditor.tsx:435

Adds an option to the editor.

Parameters

key

string

The option id.

text

string

The display text.

source?

any

Optional source item.

disabled?

boolean

Whether the option is disabled.

Returns

void

Inherited from

ServiceLookupEditorBase.addOption


addValidationRule()

Call Signature

addValidationRule(rule, uniqueName?): void

Defined in: src/ui/widgets/widget.ts:142

Adds a validation rule to the widget's DOM node.

Parameters
rule

(input) => string

The validation rule function, or a unique name when the two-argument overload is used.

uniqueName?

string

A unique name for the rule, or the rule function when the two-argument overload is used.

Returns

void

Inherited from

ServiceLookupEditorBase.addValidationRule

Call Signature

addValidationRule(uniqueName, rule): void

Defined in: src/ui/widgets/widget.ts:143

Adds a validation rule to the widget's DOM node.

Parameters
uniqueName

string

A unique name for the rule, or the rule function when the two-argument overload is used.

rule

(input) => string

The validation rule function, or a unique name when the two-argument overload is used.

Returns

void

Inherited from

ServiceLookupEditorBase.addValidationRule


afterRender()

protected afterRender(callback): void

Defined in: src/ui/widgets/widget.ts:228

Queues a callback to run after the widget's contents are rendered.

Parameters

callback

() => void

The callback to run after rendering.

Returns

void

Inherited from

ServiceLookupEditorBase.afterRender


allowClear()

protected allowClear(): boolean

Defined in: src/ui/editors/comboboxeditor.tsx:246

Whether the selection can be cleared.

Returns

boolean

True when clear is allowed.

Inherited from

ServiceLookupEditorBase.allowClear


asyncSearch()

protected asyncSearch(query): Promise<ComboboxSearchResult<TItem>>

Defined in: src/ui/editors/servicelookupeditor.ts:247

Performs an asynchronous search over the service results.

Parameters

query

ComboboxSearchQuery

The search query.

Returns

Promise<ComboboxSearchResult<TItem>>

A promise resolving to the search result.

Inherited from

ServiceLookupEditorBase.asyncSearch


byId()

protected byId<TElement>(id): Fluent<TElement>

Defined in: src/ui/widgets/widget.ts:154

Finds a child element by its prefix-relative id.

Type Parameters

TElement

TElement extends HTMLElement = HTMLElement

Parameters

id

string

The id relative to the widget's id prefix.

Returns

Fluent<TElement>

A Fluent wrapper for the matching element.

Inherited from

ServiceLookupEditorBase.byId


canSearch()

protected canSearch(byId): boolean

Defined in: src/ui/editors/servicelookupeditor.ts:232

Whether a search can be performed.

Parameters

byId

boolean

Whether the search is by id.

Returns

boolean

True when searchable.

Inherited from

ServiceLookupEditorBase.canSearch


cascadeItems()

protected cascadeItems(items): TItem[]

Defined in: src/ui/editors/comboboxeditor.tsx:1001

Filters items by the cascade value.

Parameters

items

TItem[]

The items to filter.

Returns

TItem[]

The filtered items.

Inherited from

ServiceLookupEditorBase.cascadeItems


change()

change(handler): void

Defined in: src/ui/widgets/widget.ts:179

Registers a change handler on the widget's DOM node.

Parameters

handler

(e) => void

The change event handler.

Returns

void

Inherited from

ServiceLookupEditorBase.change


changeSelect2()

changeSelect2(handler): void

Defined in: src/ui/widgets/widget.ts:188

Registers a change handler that ignores changes originating from combobox setting values.

Parameters

handler

(e) => void

The change event handler.

Returns

void

Inherited from

ServiceLookupEditorBase.changeSelect2


clearItems()

clearItems(): void

Defined in: src/ui/editors/comboboxeditor.tsx:408

Clears all items from the editor.

Returns

void

Inherited from

ServiceLookupEditorBase.clearItems


createEditDialog()

protected createEditDialog(callback): void

Defined in: src/ui/editors/comboboxeditor.tsx:1079

Creates an edit dialog for in-place add.

Parameters

callback

(dlg) => void

Callback invoked with the created dialog.

Returns

void

Inherited from

ServiceLookupEditorBase.createEditDialog


deferRender()

protected deferRender(): boolean

Defined in: src/ui/widgets/widget.ts:98

Determines whether rendering should be deferred until init is called.

Returns

boolean

True to defer rendering.

Inherited from

ServiceLookupEditorBase.deferRender


destroy()

destroy(): void

Defined in: src/ui/editors/comboboxeditor.tsx:119

Disposes the combobox and delegates to the base destroy.

Returns

void

Inherited from

ServiceLookupEditorBase.destroy


editDialogDataChange()

protected editDialogDataChange(): void

Defined in: src/ui/editors/comboboxeditor.tsx:1125

Hook invoked when the edit dialog data changes.

Returns

void

Inherited from

ServiceLookupEditorBase.editDialogDataChange


emptyItemText()

protected emptyItemText(): string

Defined in: src/ui/editors/comboboxeditor.tsx:157

Returns the text for the empty item.

Returns

string

The empty item text.

Inherited from

ServiceLookupEditorBase.emptyItemText


filterItems()

protected filterItems(items): TItem[]

Defined in: src/ui/editors/comboboxeditor.tsx:1028

Filters items by the filter value.

Parameters

items

TItem[]

The items to filter.

Returns

TItem[]

The filtered items.

Inherited from

ServiceLookupEditorBase.filterItems


findById()

protected findById<TElement>(id): TElement

Defined in: src/ui/widgets/widget.ts:163

Finds a child element by its prefix-relative id.

Type Parameters

TElement

TElement extends HTMLElement = HTMLElement

Parameters

id

string

The id relative to the widget's id prefix.

Returns

TElement

The matching element, or null if not found.

Inherited from

ServiceLookupEditorBase.findById


get_cascadeField()

protected get_cascadeField(): string

Defined in: src/ui/editors/comboboxeditor.tsx:872

Returns the cascade field name.

Returns

string

The cascade field.

Inherited from

ServiceLookupEditorBase.get_cascadeField


get_cascadeFrom()

protected get_cascadeFrom(): string

Defined in: src/ui/editors/comboboxeditor.tsx:839

Returns the cascade-from parent id.

Returns

string

The parent id.

Inherited from

ServiceLookupEditorBase.get_cascadeFrom


get_cascadeValue()

protected get_cascadeValue(): any

Defined in: src/ui/editors/comboboxeditor.tsx:902

Returns the cascade value.

Returns

any

The cascade value.

Inherited from

ServiceLookupEditorBase.get_cascadeValue


get_delimited()

get_delimited(): boolean

Defined in: src/ui/editors/comboboxeditor.tsx:364

Returns whether the value is delimited.

Returns

boolean

True when delimited.

Inherited from

ServiceLookupEditorBase.get_delimited


get_filterField()

protected get_filterField(): string

Defined in: src/ui/editors/comboboxeditor.tsx:936

Returns the filter field name.

Returns

string

The filter field.

Inherited from

ServiceLookupEditorBase.get_filterField


get_filterValue()

protected get_filterValue(): any

Defined in: src/ui/editors/comboboxeditor.tsx:966

Returns the filter value.

Returns

any

The filter value.

Inherited from

ServiceLookupEditorBase.get_filterValue


get_itemByKey()

protected get_itemByKey(): object

Defined in: src/ui/editors/comboboxeditor.tsx:619

Returns the item-by-id map.

Returns

object

The item map.

Inherited from

ServiceLookupEditorBase.get_itemByKey


get_items()

protected get_items(): ComboboxItem<TItem>[]

Defined in: src/ui/editors/comboboxeditor.tsx:611

Returns the items in the editor.

Returns

ComboboxItem<TItem>[]

The items.

Inherited from

ServiceLookupEditorBase.get_items


get_readOnly()

get_readOnly(): boolean

Defined in: src/ui/editors/comboboxeditor.tsx:775

Returns whether the editor is read-only.

Returns

boolean

True when read-only.

Inherited from

ServiceLookupEditorBase.get_readOnly


get_text()

protected get_text(): string

Defined in: src/ui/editors/comboboxeditor.tsx:756

Returns the display text of the current selection.

Returns

string

The text.

Inherited from

ServiceLookupEditorBase.get_text


get_value()

get_value(): string

Defined in: src/ui/editors/comboboxeditor.tsx:656

Returns the current value.

Returns

string

The value.

Inherited from

ServiceLookupEditorBase.get_value


get_values()

protected get_values(): string[]

Defined in: src/ui/editors/comboboxeditor.tsx:726

Returns the current values.

Returns

string[]

The values.

Inherited from

ServiceLookupEditorBase.get_values


getCascadeCriteria()

protected getCascadeCriteria(): any[]

Defined in: src/ui/editors/servicelookupeditor.ts:115

Returns the cascade criteria for the request.

Returns

any[]

The cascade criteria.

Inherited from

ServiceLookupEditorBase.getCascadeCriteria


getCascadeFromValue()

protected getCascadeFromValue(parent): any

Defined in: src/ui/editors/comboboxeditor.tsx:806

Returns the cascade value from a parent widget.

Parameters

parent

Widget<any>

The parent widget.

Returns

any

The cascade value.

Inherited from

ServiceLookupEditorBase.getCascadeFromValue


getComboboxContainer()

protected getComboboxContainer(): HTMLElement

Defined in: src/ui/editors/comboboxeditor.tsx:603

Returns the combobox container element.

Returns

HTMLElement

The container element.

Inherited from

ServiceLookupEditorBase.getComboboxContainer


getComboboxOptions()

protected getComboboxOptions(): ComboboxOptions

Defined in: src/ui/editors/comboboxeditor.tsx:270

Returns the combobox options for this editor.

Returns

ComboboxOptions

Combobox options.

Inherited from

ServiceLookupEditorBase.getComboboxOptions


getCreateSearchChoice()

getCreateSearchChoice(getName): (s) => object

Defined in: src/ui/editors/comboboxeditor.tsx:524

Returns a callback that creates a search choice for a term.

Parameters

getName

(z) => string

Optional callback to get the name of an item.

Returns

The search choice callback.

(s): object

Parameters
s

string

Returns

object

id

id: string

text

text: string

Inherited from

ServiceLookupEditorBase.getCreateSearchChoice


getCriteria()

protected getCriteria(query): any[]

Defined in: src/ui/editors/servicelookupeditor.ts:172

Returns the combined criteria for the request.

Parameters

query

ComboboxSearchQuery

The search query.

Returns

any[]

The criteria.

Inherited from

ServiceLookupEditorBase.getCriteria


getCssClass()

protected getCssClass(): string

Defined in: src/ui/widgets/widget.ts:106

Returns the CSS class(es) applied to the widget's DOM node.

Returns

string

The space-separated CSS class string.

Inherited from

ServiceLookupEditorBase.getCssClass


getCustomAttribute()

protected getCustomAttribute<TAttr>(attrType, inherit): TAttr

Defined in: src/ui/widgets/widget.ts:220

Returns a custom attribute applied to the widget's type.

Type Parameters

TAttr

TAttr extends CustomAttribute

Parameters

attrType

(...args) => TAttr

The attribute type to look up.

inherit

boolean = true

Whether to search inherited types; defaults to true.

Returns

TAttr

The matching attribute, or null.

Inherited from

ServiceLookupEditorBase.getCustomAttribute


getDialogType()

protected getDialogType(): DialogType | PromiseLike<DialogType>

Defined in: src/ui/editors/comboboxeditor.tsx:1054

Returns the dialog type used for in-place add.

Returns

DialogType | PromiseLike<DialogType>

The dialog type.

Inherited from

ServiceLookupEditorBase.getDialogType


getDialogTypeKey()

protected getDialogTypeKey(): string

Defined in: src/ui/editors/servicelookupeditor.ts:50

Returns the dialog type key for in-place add.

Returns

string

The dialog type key.

Inherited from

ServiceLookupEditorBase.getDialogTypeKey


getEditValue()

getEditValue(property, target): void

Defined in: src/ui/editors/comboboxeditor.tsx:590

Gets the edit value into a target object.

Parameters

property

PropertyItem

The property item.

target

any

The target object.

Returns

void

Inherited from

ServiceLookupEditorBase.getEditValue


getFilterCriteria()

protected getFilterCriteria(): any[]

Defined in: src/ui/editors/servicelookupeditor.ts:137

Returns the filter criteria for the request.

Returns

any[]

The filter criteria.

Inherited from

ServiceLookupEditorBase.getFilterCriteria


getGridField()

getGridField(): Fluent

Defined in: src/ui/widgets/widget.ts:171

Returns the closest .field element containing the widget's DOM node.

Returns

Fluent

A Fluent wrapper for the grid field.

Inherited from

ServiceLookupEditorBase.getGridField


getIdField()

protected getIdField(): any

Defined in: src/ui/editors/comboboxeditor.tsx:174

Returns the id field name.

Returns

any

The id field.

Inherited from

ServiceLookupEditorBase.getIdField


getIdListCriteria()

protected getIdListCriteria(idList): any[]

Defined in: src/ui/editors/servicelookupeditor.ts:153

Returns the criteria for the given id list.

Parameters

idList

any[]

The id list.

Returns

any[]

The criteria.

Inherited from

ServiceLookupEditorBase.getIdListCriteria


getIncludeColumns()

protected getIncludeColumns(): string[]

Defined in: src/ui/editors/servicelookupeditor.ts:89

Returns the columns to include in the request.

Returns

string[]

The include columns.

Inherited from

ServiceLookupEditorBase.getIncludeColumns


getListRequest()

protected getListRequest(query): ListRequest

Defined in: src/ui/editors/servicelookupeditor.ts:183

Returns the list request for the given query.

Parameters

query

ComboboxSearchQuery

The search query.

Returns

ListRequest

The list request.

Inherited from

ServiceLookupEditorBase.getListRequest


getPageSize()

protected getPageSize(): number

Defined in: src/ui/editors/comboboxeditor.tsx:166

Returns the page size for paged searches.

Returns

number

The page size.

Inherited from

ServiceLookupEditorBase.getPageSize


getService()

protected getService(): string

Defined in: src/ui/editors/servicelookupeditor.ts:69

Returns the service endpoint path.

Returns

string

The service path.

Inherited from

ServiceLookupEditorBase.getService


getServiceCallOptions()

protected getServiceCallOptions(query): ServiceOptions<ListResponse<TItem>>

Defined in: src/ui/editors/servicelookupeditor.ts:210

Returns the service call options for the given query.

Parameters

query

ComboboxSearchQuery

The search query.

Returns

ServiceOptions<ListResponse<TItem>>

Service options.

Inherited from

ServiceLookupEditorBase.getServiceCallOptions


getServiceUrl()

protected getServiceUrl(): string

Defined in: src/ui/editors/servicelookupeditor.ts:77

Returns the resolved service URL.

Returns

string

The service URL.

Inherited from

ServiceLookupEditorBase.getServiceUrl


getSort()

protected getSort(): any[]

Defined in: src/ui/editors/servicelookupeditor.ts:107

Returns the sort order for results.

Returns

any[]

The sort descriptors.

Inherited from

ServiceLookupEditorBase.getSort


getTextField()

protected getTextField(): any

Defined in: src/ui/editors/comboboxeditor.tsx:194

Returns the text field name.

Returns

any

The text field.

Inherited from

ServiceLookupEditorBase.getTextField


getTypeDelay()

protected getTypeDelay(): any

Defined in: src/ui/editors/comboboxeditor.tsx:149

Returns the type delay for searching.

Returns

any

The delay in milliseconds.

Inherited from

ServiceLookupEditorBase.getTypeDelay


hasAsyncSource()

protected hasAsyncSource(): boolean

Defined in: src/ui/editors/servicelookupeditor.ts:223

Whether the editor has an asynchronous item source.

Returns

boolean

True.

Inherited from

ServiceLookupEditorBase.hasAsyncSource


init()

init(): this

Defined in: src/ui/widgets/widget.ts:243

Initializes the widget, rendering its contents if rendering was deferred.

Returns

this

This widget instance.

Inherited from

ServiceLookupEditorBase.init


initNewEntity()

protected initNewEntity(entity): void

Defined in: src/ui/editors/comboboxeditor.tsx:1095

Initializes a new entity with cascade/filter values.

Parameters

entity

TItem

The new entity.

Returns

void

Inherited from

ServiceLookupEditorBase.initNewEntity


inplaceCreateClick()

protected inplaceCreateClick(e): void

Defined in: src/ui/editors/comboboxeditor.tsx:1147

Handles the in-place create button click.

Parameters

e

Event

The click event.

Returns

void

Inherited from

ServiceLookupEditorBase.inplaceCreateClick


internalRenderContents()

internalRenderContents(): void

Defined in: src/ui/widgets/widget.ts:266

Renders the widget's contents and runs any queued after-render callbacks.

Returns

void

Inherited from

ServiceLookupEditorBase.internalRenderContents


isAutoComplete()

protected isAutoComplete(): boolean

Defined in: src/ui/editors/comboboxeditor.tsx:515

Whether arbitrary values are allowed.

Returns

boolean

True when auto-complete is enabled.

Inherited from

ServiceLookupEditorBase.isAutoComplete


isMultiple()

protected isMultiple(): boolean

Defined in: src/ui/editors/comboboxeditor.tsx:255

Whether multiple items can be selected.

Returns

boolean

True when multiple.

Inherited from

ServiceLookupEditorBase.isMultiple


itemDisabled()

protected itemDisabled(item): boolean

Defined in: src/ui/editors/comboboxeditor.tsx:215

Whether an item is disabled.

Parameters

item

TItem

The item.

Returns

boolean

True when disabled.

Inherited from

ServiceLookupEditorBase.itemDisabled


itemId()

protected itemId(item): string

Defined in: src/ui/editors/comboboxeditor.tsx:183

Returns the id of an item.

Parameters

item

TItem

The item.

Returns

string

The item id.

Inherited from

ServiceLookupEditorBase.itemId


itemText()

protected itemText(item): string

Defined in: src/ui/editors/comboboxeditor.tsx:203

Returns the display text of an item.

Parameters

item

TItem

The item.

Returns

string

The item text.

Inherited from

ServiceLookupEditorBase.itemText


legacyTemplateRender()

protected legacyTemplateRender(): boolean

Defined in: src/ui/widgets/widget.ts:291

Renders the widget from a legacy getTemplate string, if defined.

Returns

boolean

True if a legacy template was rendered.

Inherited from

ServiceLookupEditorBase.legacyTemplateRender


mapItem()

protected mapItem(item): ComboboxItem

Defined in: src/ui/editors/comboboxeditor.tsx:224

Maps an item to a combobox item.

Parameters

item

TItem

The item.

Returns

ComboboxItem

The combobox item.

Inherited from

ServiceLookupEditorBase.mapItem


mapItems()

protected mapItems(items): ComboboxItem<any>[]

Defined in: src/ui/editors/comboboxeditor.tsx:238

Maps a list of items to combobox items.

Parameters

items

TItem[]

The items.

Returns

ComboboxItem<any>[]

The combobox items.

Inherited from

ServiceLookupEditorBase.mapItems


openDropdown()

openDropdown(): void

Defined in: src/ui/editors/comboboxeditor.tsx:1219

Opens the combobox dropdown.

Returns

void

Inherited from

ServiceLookupEditorBase.openDropdown


render()

render(): any

Defined in: src/ui/widgets/widget.ts:253

Returns the main element for this widget or the document fragment. As widgets may get their elements from props unlike regular JSX widgets, this method should not be overridden. Override renderContents() instead.

Returns

any

Inherited from

ServiceLookupEditorBase.render


renderContents()

protected renderContents(): any

Defined in: src/ui/widgets/widget.ts:281

Renders the widget's contents. Override this to provide custom content.

Returns

any

The rendered contents.

Inherited from

ServiceLookupEditorBase.renderContents


set_cascadeField()

protected set_cascadeField(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:888

Sets the cascade field name.

Parameters

value

string

The cascade field.

Returns

void

Inherited from

ServiceLookupEditorBase.set_cascadeField


set_cascadeFrom()

protected set_cascadeFrom(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:855

Sets the cascade-from parent id.

Parameters

value

string

The parent id.

Returns

void

Inherited from

ServiceLookupEditorBase.set_cascadeFrom


set_cascadeValue()

protected set_cascadeValue(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:918

Sets the cascade value and refreshes items.

Parameters

value

any

The cascade value.

Returns

void

Inherited from

ServiceLookupEditorBase.set_cascadeValue


set_filterField()

protected set_filterField(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:952

Sets the filter field name.

Parameters

value

string

The filter field.

Returns

void

Inherited from

ServiceLookupEditorBase.set_filterField


set_filterValue()

protected set_filterValue(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:982

Sets the filter value and refreshes items.

Parameters

value

any

The filter value.

Returns

void

Inherited from

ServiceLookupEditorBase.set_filterValue


set_readOnly()

set_readOnly(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:794

Sets whether the editor is read-only.

Parameters

value

boolean

True to enable read-only mode.

Returns

void

Inherited from

ServiceLookupEditorBase.set_readOnly


set_value()

set_value(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:672

Sets the current value.

Parameters

value

string

The value to set.

Returns

void

Inherited from

ServiceLookupEditorBase.set_value


set_values()

protected set_values(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:742

Sets the current values.

Parameters

value

string[]

The values to set.

Returns

void

Inherited from

ServiceLookupEditorBase.set_values


setCascadeFrom()

protected setCascadeFrom(value): void

Defined in: src/ui/editors/comboboxeditor.tsx:816

Sets the cascade-from parent id.

Parameters

value

string

The parent id.

Returns

void

Inherited from

ServiceLookupEditorBase.setCascadeFrom


setEditDialogReadOnly()

protected setEditDialogReadOnly(dialog): void

Defined in: src/ui/editors/comboboxeditor.tsx:1113

Sets the edit dialog to read-only.

Parameters

dialog

any

The dialog.

Returns

void

Inherited from

ServiceLookupEditorBase.setEditDialogReadOnly


setEditValue()

setEditValue(source, property): void

Defined in: src/ui/editors/comboboxeditor.tsx:575

Sets the edit value from a source object.

Parameters

source

any

The source object.

property

PropertyItem

The property item.

Returns

void

Inherited from

ServiceLookupEditorBase.setEditValue


setTermOnNewEntity()

protected setTermOnNewEntity(entity, term, dialog): void

Defined in: src/ui/editors/comboboxeditor.tsx:1134

Sets the search term on a new entity.

Parameters

entity

TItem

The new entity.

term

string

The search term.

dialog

any

The edit dialog.

Returns

void

Inherited from

ServiceLookupEditorBase.setTermOnNewEntity


syncOrAsyncThen()

protected syncOrAsyncThen<T>(syncMethod, asyncMethod, then): void

Defined in: src/ui/widgets/widget.ts:318

Runs a method synchronously or asynchronously depending on the widget's useAsync flag, then invokes a continuation.

Type Parameters

T

T

Parameters

syncMethod

() => T

The synchronous method to run.

asyncMethod

() => PromiseLike<T>

The asynchronous method to run.

then

(v) => void

The continuation invoked with the result.

Returns

void

Inherited from

ServiceLookupEditorBase.syncOrAsyncThen


updateItems()

protected updateItems(): void

Defined in: src/ui/editors/comboboxeditor.tsx:1047

Refreshes the items in the editor.

Returns

void

Inherited from

ServiceLookupEditorBase.updateItems


useIdPrefix()

protected useIdPrefix(): IdPrefixType

Defined in: src/ui/widgets/widget.ts:329

Returns an id prefix helper for resolving child element ids.

Returns

IdPrefixType

An IdPrefixType proxy for this widget's id prefix.

Inherited from

ServiceLookupEditorBase.useIdPrefix


useInplaceAdd()

protected useInplaceAdd(): boolean

Defined in: src/ui/editors/comboboxeditor.tsx:504

Whether in-place add is enabled.

Returns

boolean

True when enabled.

Inherited from

ServiceLookupEditorBase.useInplaceAdd


create()

static create<TWidget, P>(params): TWidget

Defined in: src/ui/widgets/widget.ts:202

Creates a widget instance from the given params, appending its element to the container and invoking the init/init callbacks.

Type Parameters

TWidget

TWidget extends Widget<P>

P

P

Parameters

params

CreateWidgetParams<TWidget, P>

The widget creation params.

Returns

TWidget

The created widget instance.

Inherited from

ServiceLookupEditorBase.create


createDefaultElement()

static createDefaultElement(): HTMLInputElement

Defined in: src/ui/editors/comboboxeditor.tsx:75

Creates the default hidden input element for the combobox.

Returns

HTMLInputElement

The hidden input element.

Inherited from

ServiceLookupEditorBase.createDefaultElement


filterByText()

static filterByText<TItem>(items, getText, term): TItem[]

Defined in: src/ui/editors/comboboxeditor.tsx:630

Filters items by text, matching the term against the item text.

Type Parameters

TItem

TItem

Parameters

items

TItem[]

The items to filter.

getText

(item) => string

Callback that returns the text of an item.

term

string

The search term.

Returns

TItem[]

The filtered items.

Inherited from

ServiceLookupEditorBase.filterByText


getWidgetName()

static getWidgetName(type): string

Defined in: src/ui/widgets/widget.ts:131

Returns the widget name for a type, used for association and unique names.

Parameters

type

Function

The widget type.

Returns

string

The widget name.

Inherited from

ServiceLookupEditorBase.getWidgetName


registerClass()

protected static registerClass<TypeName>(typeName, intfAndAttr?): ClassTypeInfo<TypeName>

Defined in: src/ui/widgets/widget.ts:342

Registers this type as a class with the given type name.

Type Parameters

TypeName

TypeName

Parameters

typeName

StringLiteral<TypeName>

The type name to register.

intfAndAttr?

(InterfaceType | AttributeSpecifier)[]

Optional interfaces and attributes.

Returns

ClassTypeInfo<TypeName>

The class type info.

Inherited from

ServiceLookupEditorBase.registerClass


registerEditor()

protected static registerEditor<TypeName>(typeName, intfAndAttr?): EditorTypeInfo<TypeName>

Defined in: src/ui/widgets/widget.ts:357

Registers this type as an editor with the given type name.

Type Parameters

TypeName

TypeName

Parameters

typeName

StringLiteral<TypeName>

The type name to register.

intfAndAttr?

(InterfaceType | AttributeSpecifier)[]

Optional interfaces and attributes.

Returns

EditorTypeInfo<TypeName>

The editor type info.

Inherited from

ServiceLookupEditorBase.registerEditor