File

src/ui/lookup/smart-lookup.component.ts

Extends

AbstractSmartViewerFieldComponent

Implements

OnInit DoCheck AfterViewInit

Metadata

Index

Properties
Methods
Inputs
Outputs
HostListeners
Accessors

Constructor

constructor(elementRef: ElementRef, errorHandler: SmartErrorHandlerService, vcRef: ViewContainerRef, smartWindowService: SmartWindowService, widgetFacadeFactory: WidgetFacadeFactory, changeDetector: ChangeDetectorRef, viewerHelper: SmartViewerHelperService<AbstractFrameComponent>, formInstanceService: SmartFormInstanceService)
Parameters :
Name Type Optional
elementRef ElementRef No
errorHandler SmartErrorHandlerService No
vcRef ViewContainerRef No
smartWindowService SmartWindowService No
widgetFacadeFactory WidgetFacadeFactory No
changeDetector ChangeDetectorRef No
viewerHelper SmartViewerHelperService<AbstractFrameComponent> No
formInstanceService SmartFormInstanceService No

Inputs

allow-optional-filter-fields
Type : boolean

Determines whether the lookup's Smart Filter should allow optional filter fields to be set.

beforePerformLookup
Type : BeforePerformLookupEventHandler

Sets the before-perform-lookup handler.

dataRequested
Type : string | unknown

Sets the data requested handler or action name.

enabled
Type : boolean

Indicates whether the lookup's input and search button are enabled.

filter-fields-initial
Type : string

Initial filter fields that should be activated within the lookup's Smart Filter.

filter-fields-optional
Type : string

The optional filter fields that the lookup's Smart Filter should offer. Requires that the allow-optional-filter-fields attribute is set to true.

id
Type : string

Sets the lookup element id.

keyValueModel
Type : any

The "invisible" part of the lookup value (ex. ID, GUID)

name
Type : string

Sets the lookup name.

numeric
Type : boolean
provide-foreign-field-value
Type : void | string

Sets the provider for foreign field values.

selected
Type : any

The parent Smart Viewer's attached datasource's selection. This is always set internally by the Smart Viewer and should NOT be used in development.

show-filter
Type : boolean

If set to true, the lookup will display a Smart Filter above the grid in it's dialog.

smart-business-entity-name
Type : string

The business entity that the lookup's attached data source should use.

smart-entity-table
Type : string

The table that the lookup's attached data source should use.

smart-entity-view
Type : string

The optional entity view that the lookup's attached data source should use.

smart-fetch-data-from-key-value-on-navigate
Type : boolean

Sets whether data is fetched from key value on navigate.

smart-fetch-data-on-navigate
Type : boolean

Sets whether data is fetched on navigate.

smart-filter
Type : SmartFilterDescriptor | string

Sets the smartFilter property of a lookup, uses SmartFilterDescriptor or ABL strings

smart-foreign-fields
Type : string
smart-grid-layout
Type : any

The grid layout that the lookup's grid should use.

smart-help-url
Type : string
smart-lookup-auto-complete
Type : string

The lookup's autocomplete options.

smart-lookup-delimiter
Type : string

Sets the delimiter that separates multiple values.

smart-lookup-dialog-options
Type : string

Sets the dialog options string.

smart-lookup-dialog-query-sort
Type : string

Sets the lookup dialog query sort expression.

smart-lookup-dialog-query-string
Type : string

Sets the lookup dialog query string for the Smart Lookup component.

smart-lookup-disable-autocomplete
Type : boolean

Sets whether autocomplete is disabled.

smart-lookup-fields
Type : string

Additional fields to fetch from the lookup's internal data-source when selecting a record in the lookup dialog or when the user typed a value in the lookup field

smart-lookup-fields-binding
Type : any

Sets the bound fields expression.

smart-lookup-header
Type : string

Sets the lookup dialog title.

smart-lookup-key
Type : string

Sets the lookup key field name.

smart-lookup-key-field
Type : string

The name of the field that the lookup component should use to perform autocomplete.

smart-lookup-key-field-binding
Type : string

Sets the key field binding expression.

smart-lookup-key-value
Type : string

Sets the lookup key value.

smart-lookup-key-value-field
Type : string

The name of the field from the lookup's internal data-source to match with the bound smart-lookup-key-value.

smart-lookup-key-value-field-binding
Type : string

Sets the key value field binding.

smart-lookup-multiple
Type : boolean

Sets whether the lookup accepts multiple values (a typed delimited list or multiple selected dialog rows).

smart-lookup-parent-filter-field
Type : string

Sets the parent filter field.

smart-lookup-parent-filter-operator
Type : string

Additional filter that the lookup should apply on top of the user input.

smart-lookup-parent-filter-value
Type : string

Sets the parent filter value.

smart-lookup-query-sort
Type : string

Sets the lookup query sort expression for autocomplete data.

smart-lookup-query-string
Type : string

Sets the lookup query string for the Smart Lookup component.

smart-partial-dataset
Type : boolean

Deprecated no-op. Partial dataset handling is derived from the JSDO table reference root-table metadata.

smart-server-side-filtering
Type : boolean

Optional flag used for setting the serverSideFiltering property on the smart data sources connected to the lookup.

smart-server-side-sorting
Type : boolean
smart-stop-after
Type : number

Sets the stopAfter value.

smartModel
Type : any

The "visible" value of the lookup value

editorButtons
Type : EditorButton[]
Default value : []
smart-viewer-unbound-field
Type : boolean
smart-instance-name
Type : string

The instance name of the component

smart-object-name
Type : string

The object name of the component

Outputs

afterPerformLookup
Type : EventEmitter<void>
blur
Type : EventEmitter<void>
focus
Type : EventEmitter<void>
keyValueModelChange
Type : EventEmitter<any>
lookupComplete
Type : EventEmitter<void>
on-change
Type : EventEmitter<any>

Fires when the lookup's selection has changed, either by autocomplete or by selecting a value from the lookup's grid.

smartModelChange
Type : EventEmitter<any>
onEditorButtonClicked
Type : EditorButton

HostListeners

keydown
Arguments : '$event'
keydown(event: KeyboardEvent)

Hotkeys handler

Parameters :
Name Optional
event No

Methods

callNativeMethod
callNativeMethod(methodName: string, args: any[])
Parameters :
Name Type Optional
methodName string No
args any[] No
Returns : any
clear
clear()
Returns : void
closeLookupDialog
closeLookupDialog(result: string)
Parameters :
Name Type Optional
result string No
Returns : void
externalDataGridSelectionChanged
externalDataGridSelectionChanged(selectionEvent: SelectionEvent)
Parameters :
Name Type Optional
selectionEvent SelectionEvent No
Returns : void
getDataSource
getDataSource()
Returns : Observable<AbstractSmartDataSource>

Observable

getNativeProperty
getNativeProperty(propertyName: string)
Parameters :
Name Type Optional
propertyName string No
Returns : any
handleAutocompleteDropdown
handleAutocompleteDropdown(event: any)
Parameters :
Name Type Optional
event any No
Returns : void
handleKeyDown
handleKeyDown($event: unknown)
Parameters :
Name Type Optional
$event unknown No
Returns : void
Async handleValueChange
handleValueChange(value: any)

Handles the change in selected value from the autocomplete component.

Parameters :
Name Type Optional Description
value any No
  • The value selected by the user.
Returns : any

A promise that resolves when the value change has been processed.

hotkeysHandler
hotkeysHandler(event: KeyboardEvent)
Decorators :
@HostListener('keydown', ['$event'])

Hotkeys handler

Parameters :
Name Type Optional
event KeyboardEvent No
Returns : void
Async lookup
lookup()

Opens the lookup's dialog, and updates the selected record accordingly should the user select a value from the lookup's grid.

Returns : any
onGridDoubleClicked
onGridDoubleClicked()
Returns : void
reInitDatasource
reInitDatasource()
Returns : void
setDataSource
setDataSource(dataSourceName: string)
Parameters :
Name Type Optional
dataSourceName string No
Returns : void
setNativeProperty
setNativeProperty(propertyName: string, value: any)
Parameters :
Name Type Optional
propertyName string No
value any No
Returns : void

Properties

autocompleteItem
Type : any

The value determined by executing autocomplete.

autoCompleteOptions
Type : any
Readonly beforePerformLookupSignal
Type : Signal<BeforePerformLookupEventHandler>
Default value : this._beforePerformLookupSignal.asReadonly()
Readonly boundFieldsSignal
Type : Signal<any>
Default value : this._boundFieldsSignal.asReadonly()
Public Readonly changeDetector
Type : ChangeDetectorRef
Readonly dataRequestedSignal
Type : Signal<string | unknown>
Default value : this._dataRequestedSignal.asReadonly()
datasourceId
Type : string
Default value : 'internal_' + new Date().getTime()
dialogComponent
Type : SmartDialogComponent
Decorators :
@ViewChild('lookupDialog')
dialogOpened
Type : unknown
Default value : false
Readonly dialogOptionsSignal
Type : Signal<string>
Default value : this._dialogOptionsSignal.asReadonly()
dialogTemplate
Type : TemplateRef<any>
Decorators :
@ViewChild('dialogTemplate', {static: true})
Readonly dialogTitleSignal
Type : Signal<string>
Default value : this._dialogTitleSignal.asReadonly()
externalDataLoading
Type : unknown
Default value : false
externalDialogData
Type : ReplaySubject<any[]>
Default value : new ReplaySubject(1)
Readonly fetchDataFromKeyValueOnNavigateSignal
Type : Signal<boolean>
Default value : this._fetchDataFromKeyValueOnNavigateSignal.asReadonly()
Readonly fetchDataOnNavigateSignal
Type : Signal<boolean>
Default value : this._fetchDataOnNavigateSignal.asReadonly()
Readonly filterFieldSignal
Type : Signal<string>
Default value : this._filterFieldSignal.asReadonly()
Readonly filterOperatorSignal
Type : Signal<string>
Default value : this._filterOperatorSignal.asReadonly()
Readonly filterValueSignal
Type : Signal<string>
Default value : this._filterValueSignal.asReadonly()
handleFilterChange
Type : unknown
Default value : _.debounce(async (ev: any) => { // Cancel any in-flight autocomplete/dialog data request before issuing a new // one so a late response cannot overwrite the current input (SCLNG-1594). this.cancelInFlightLookupRequests(); this._doingAutocomplete = true; if (ev !== this.smartModel) { // Keep typed text local while filtering; commit happens only after a valid selection. this.smartModel = ev; } else { // No input change means no autocomplete request should remain in progress. this._doingAutocomplete = false; return; } this.autocompleteItems = []; if (this.checkForeignFields('lookup')) { if (this.lookupQueryString) { this.filterByForeignFields('lookup'); } const promise = this.doAutoComplete(ev); if (promise) { promise.then(() => { if (this.disableAutocomplete !== true) { this.autocompleteField.togglePopup(false); } }); } } else { this._doingAutocomplete = false; this._beforePerformLookupFilter = null; } }, 750)
Parameters :
Name
ev
handleMultiFilterChange
Type : unknown
Default value : _.debounce(async (text: string) => { this.cancelInFlightLookupRequests(); if (!text) { this.autocompleteItems = []; this._multiselectField?.toggle(false); return; } this._doingAutocomplete = true; try { if (this.checkForeignFields('lookup')) { if (this.lookupQueryString) { this.filterByForeignFields('lookup'); } await this.doAutoComplete(text, false); } } finally { this._doingAutocomplete = false; this._beforePerformLookupFilter = null; } // Open the popup only once suggestions have arrived (the (open) handler // suppresses an empty popup on focus/typing) (SCLNG-1473). this._multiselectField?.toggle( !!this.autocompleteItems && this.autocompleteItems.length > 0 ); }, 750)

Debounced filter handler for the Kendo MultiSelect (chip mode). Fetches matching records server-side to populate the dropdown only; selection is handled natively by the multiselect via handleMultiValueChange.

Readonly idSignal
Type : Signal<string>
Default value : this._idSignal.asReadonly()
isUsingNamedQuery
Type : boolean
Readonly keyFieldBindingSignal
Type : Signal<string>
Default value : this._keyFieldBindingSignal.asReadonly()
Readonly keySignal
Type : Signal<string>
Default value : this._keySignal.asReadonly()
Readonly keyValueFieldBindingSignal
Type : Signal<string>
Default value : this._keyValueFieldBindingSignal.asReadonly()
Readonly keyValueFieldSignal
Type : Signal<string>
Default value : this._keyValueFieldSignal.asReadonly()
Readonly keyValueSignal
Type : Signal<string>
Default value : this._keyValueSignal.asReadonly()
lookupDialogDatasourceId
Type : unknown
Default value : UUID.UUID()
lookupDialogInstanceId
Type : unknown
Default value : UUID.UUID()
namedQueryDialogTemplate
Type : TemplateRef<any>
Decorators :
@ViewChild('dialogNamedQueryTemplate', {static: true})
Readonly nameSignal
Type : Signal<string>
Default value : this._nameSignal.asReadonly()
Readonly provideForeignFieldValueSignal
Type : Signal<void | string>
Default value : this._provideForeignFieldValueSignal.asReadonly()
Readonly showOptionalFieldsSignal
Type : Signal<boolean>
Default value : this._showOptionalFieldsSignal.asReadonly()
Readonly stopAfterSignal
Type : Signal<number>
Default value : this._stopAfterSignal.asReadonly()

Accessors

numeric
getnumeric()

Returns whether numeric input is enabled.

Returns : boolean
setnumeric(value: boolean)
Parameters :
Name Type Optional
value boolean No
Returns : void
name
getname()

Returns the lookup name.

Returns : string
setname(value: string)

Sets the lookup name.

Parameters :
Name Type Optional Description
value string No
  • The name.
Returns : void
beforePerformLookup
getbeforePerformLookup()

Returns the before-perform-lookup handler.

setbeforePerformLookup(value: BeforePerformLookupEventHandler)

Sets the before-perform-lookup handler.

Parameters :
Name Type Optional Description
value BeforePerformLookupEventHandler No
  • The handler.
Returns : void
partialDataset
getpartialDataset()

Returns the deprecated partial dataset compatibility value.

Returns : boolean
setpartialDataset(value: boolean)

Deprecated no-op. Partial dataset handling is derived from the JSDO table reference root-table metadata.

Parameters :
Name Type Optional
value boolean No
Returns : void
dataRequested
getdataRequested()

Returns the data requested handler or action name.

Returns : string | unknown
setdataRequested(value: string | unknown)

Sets the data requested handler or action name.

Parameters :
Name Type Optional Description
value string | unknown No
  • The handler or action name.
Returns : void
helpUrl
gethelpUrl()
Returns : string
sethelpUrl(value: string)
Parameters :
Name Type Optional
value string No
Returns : void
lookupLoadedOnce
getlookupLoadedOnce()

Returns whether the lookup has loaded at least once.

Returns : boolean
setlookupLoadedOnce(value: boolean)

Sets whether the lookup has loaded at least once.

Parameters :
Name Type Optional Description
value boolean No
  • The loaded flag.
Returns : void
visible
getvisible()

Returns whether the lookup is visible.

Returns : boolean
setvisible(value: boolean)

Sets whether the lookup is visible.

Parameters :
Name Type Optional Description
value boolean No
  • The visibility flag.
Returns : void
id
getid()

Returns the lookup element id.

Returns : string
setid(value: string)

Sets the lookup element id.

Parameters :
Name Type Optional Description
value string No
  • The id.
Returns : void
autoComplete
setautoComplete(value: string)

The lookup's autocomplete options.

Parameters :
Name Type Optional
value string No
Returns : void
disableAutocomplete
getdisableAutocomplete()

Returns whether autocomplete is disabled.

Returns : boolean
setdisableAutocomplete(value: boolean)

Sets whether autocomplete is disabled.

Parameters :
Name Type Optional Description
value boolean No
  • The disable flag.
Returns : void
multiple
getmultiple()

Returns whether the lookup accepts multiple values.

Returns : boolean
setmultiple(value: boolean)

Sets whether the lookup accepts multiple values (a typed delimited list or multiple selected dialog rows).

Parameters :
Name Type Optional Description
value boolean No
  • The multiple-selection flag.
Returns : void
delimiter
getdelimiter()

Returns the configured delimiter. May be undefined; the resolved value (with the , default) lives on SmartLookupMultiSelectService.

Returns : string
setdelimiter(value: string)

Sets the delimiter that separates multiple values.

Parameters :
Name Type Optional Description
value string No
  • The delimiter character(s).
Returns : void
dialogOptions
getdialogOptions()

Returns the dialog options string.

Returns : string
setdialogOptions(value: string)

Sets the dialog options string.

Parameters :
Name Type Optional Description
value string No
  • The dialog options.
Returns : void
showLookupTemplate
getshowLookupTemplate()

Returns whether the lookup template should be displayed.

Returns : boolean
setshowLookupTemplate(value: boolean)

Sets whether the lookup template should be displayed.

Parameters :
Name Type Optional Description
value boolean No
  • The display flag.
Returns : void
_dialogOptions
get_dialogOptions()

Returns the parsed dialog options for the lookup dialog.

Returns : any
autocompleteItems
getautocompleteItems()

Returns the current autocomplete items.

Returns : any[]
setautocompleteItems(value: any[])

A list of possible autocomplete values determined by the user's input.

Parameters :
Name Type Optional
value any[] No
Returns : void
keyValueModel
getkeyValueModel()
Returns : any
setkeyValueModel(value: any)

The "invisible" part of the lookup value (ex. ID, GUID)

Parameters :
Name Type Optional
value any No
Returns : void
smartModel
getsmartModel()
Returns : any
setsmartModel(value: any)

The "visible" value of the lookup value

Parameters :
Name Type Optional
value any No
Returns : void
selected
getselected()
setselected(value: any)

The parent Smart Viewer's attached datasource's selection. This is always set internally by the Smart Viewer and should NOT be used in development.

Parameters :
Name Type Optional
value any No
Returns : void
smartGridLayout
getsmartGridLayout()

Returns the smart grid layout.

Returns : any
setsmartGridLayout(value: any)

The grid layout that the lookup's grid should use.

Parameters :
Name Type Optional
value any No
Returns : void
dialogTitle
getdialogTitle()

Returns the lookup dialog title.

Returns : string
setdialogTitle(value: string)

Sets the lookup dialog title.

Parameters :
Name Type Optional Description
value string No
  • The title.
Returns : void
key
getkey()

Returns the lookup key field name.

Returns : string
setkey(value: string)

Sets the lookup key field name.

Parameters :
Name Type Optional Description
value string No
  • The key field name.
Returns : void
keyField
getkeyField()

Returns the key field used for lookup filtering.

Returns : string
setkeyField(value: string)

The name of the field that the lookup component should use to perform autocomplete.

Parameters :
Name Type Optional
value string No
Returns : void
keyFieldBinding
getkeyFieldBinding()

Returns the key field binding expression.

Returns : string
setkeyFieldBinding(value: string)

Sets the key field binding expression.

Parameters :
Name Type Optional Description
value string No
  • The key field binding.
Returns : void
keyValue
getkeyValue()

Returns the lookup key value.

Returns : string
setkeyValue(value: string)

Sets the lookup key value.

Parameters :
Name Type Optional Description
value string No
  • The key value.
Returns : void
businessEntity
getbusinessEntity()

Returns the business entity name.

Returns : string
setbusinessEntity(value: string)

The business entity that the lookup's attached data source should use.

Parameters :
Name Type Optional
value string No
Returns : void
table
gettable()

Returns the entity table name.

Returns : string
settable(value: string)

The table that the lookup's attached data source should use.

Parameters :
Name Type Optional
value string No
Returns : void
keyValueField
getkeyValueField()

Returns the keyValueField property value. @memberof SmartLookupComponent

Returns : string
setkeyValueField(value: string)

The name of the field from the lookup's internal data-source to match with the bound smart-lookup-key-value.

Parameters :
Name Type Optional
value string No
Returns : void
keyValueFieldBinding
getkeyValueFieldBinding()

Returns the key value field binding.

Returns : string
setkeyValueFieldBinding(value: string)

Sets the key value field binding.

Parameters :
Name Type Optional Description
value string No
  • The key value field binding.
Returns : void
boundFields
getboundFields()

Returns the bound fields expression.

Returns : any
setboundFields(value: any)

Sets the bound fields expression.

Parameters :
Name Type Optional Description
value any No
  • The bound fields.
Returns : void
selectionBoundFields
setselectionBoundFields(value: string)

Additional fields to fetch from the lookup's internal data-source when selecting a record in the lookup dialog or when the user typed a value in the lookup field

Parameters :
Name Type Optional
value string No
Returns : void
filterValue
getfilterValue()

Returns the parent filter value.

Returns : string
setfilterValue(value: string)

Sets the parent filter value.

Parameters :
Name Type Optional Description
value string No
  • The filter value.
Returns : void
filterField
getfilterField()

Returns the parent filter field.

Returns : string
setfilterField(value: string)

Sets the parent filter field.

Parameters :
Name Type Optional Description
value string No
  • The filter field.
Returns : void
filterOperator
getfilterOperator()

Returns the filterOperator property value. @memberof SmartLookupComponent

Returns : string
setfilterOperator(value: string)

Additional filter that the lookup should apply on top of the user input.

Parameters :
Name Type Optional
value string No
Returns : void
showFilter
getshowFilter()

Returns whether the Smart Filter should be displayed.

Returns : boolean
setshowFilter(value: boolean)

If set to true, the lookup will display a Smart Filter above the grid in it's dialog.

Parameters :
Name Type Optional
value boolean No
Returns : void
smartFilter
getsmartFilter()

Gets the smartFilter

setsmartFilter(value: SmartFilterDescriptor | string)

Sets the smartFilter property of a lookup, uses SmartFilterDescriptor or ABL strings

Parameters :
Name Type Optional
value SmartFilterDescriptor | string No
Returns : void
lookupFilter
getlookupFilter()

Gets the lookupFilter, this returns beforePerformLookupFilter or the smartFilter property. If both are defined it will return the beforePerformLookupFilter.

smartFilterFields
getsmartFilterFields()
Returns : string
setsmartFilterFields(value: string)

Initial filter fields that should be activated within the lookup's Smart Filter.

Parameters :
Name Type Optional
value string No
Returns : void
showOptionalFields
getshowOptionalFields()

Returns the showOptionalFields property value. @memberof SmartLookupComponent

Returns : boolean
setshowOptionalFields(value: boolean)

Determines whether the lookup's Smart Filter should allow optional filter fields to be set.

Parameters :
Name Type Optional
value boolean No
Returns : void
foreignFields
getforeignFields()
Returns : string
setforeignFields(value: string)
Parameters :
Name Type Optional
value string No
Returns : void
lookupQueryString
getlookupQueryString()

Gets the lookup query string for the Smart Lookup component.

Returns : string
setlookupQueryString(value: string)

Sets the lookup query string for the Smart Lookup component.

Parameters :
Name Type Optional Description
value string No
  • The query string to be used for filtering the lookup data.
Returns : void
lookupDialogQueryString
getlookupDialogQueryString()

Gets the lookup dialog query string for the Smart Lookup component.

Returns : string
setlookupDialogQueryString(value: string)

Sets the lookup dialog query string for the Smart Lookup component.

Parameters :
Name Type Optional Description
value string No
  • The query string to be used for filtering the lookup dialog data.
Returns : void
provideForeignFieldValue
getprovideForeignFieldValue()

Returns the provider for foreign field values.

Returns : void | string
setprovideForeignFieldValue(value: (ev: ProvideForeignFieldValue) => void)

Sets the provider for foreign field values.

Parameters :
Name Type Optional Description
value function No
  • The provider function.
Returns : void
optionalFilterFields
getoptionalFilterFields()
Returns : string
setoptionalFilterFields(value: string)

The optional filter fields that the lookup's Smart Filter should offer. Requires that the allow-optional-filter-fields attribute is set to true.

Parameters :
Name Type Optional
value string No
Returns : void
serverSideFiltering
getserverSideFiltering()

Returns whether server-side filtering is enabled.

Returns : boolean
setserverSideFiltering(value: boolean)

Optional flag used for setting the serverSideFiltering property on the smart data sources connected to the lookup.

Parameters :
Name Type Optional
value boolean No
Returns : void
serverSideSorting
getserverSideSorting()

Returns whether server-side sorting is enabled.

Returns : boolean
setserverSideSorting(value: boolean)
Parameters :
Name Type Optional
value boolean No
Returns : void
fetchDataOnNavigate
getfetchDataOnNavigate()

Returns whether data is fetched on navigate.

Returns : boolean
setfetchDataOnNavigate(value: boolean)

Sets whether data is fetched on navigate.

Parameters :
Name Type Optional Description
value boolean No
  • The fetch flag.
Returns : void
fetchDataFromKeyValueOnNavigate
getfetchDataFromKeyValueOnNavigate()

Returns whether data is fetched from key value on navigate.

Returns : boolean
setfetchDataFromKeyValueOnNavigate(value: boolean)

Sets whether data is fetched from key value on navigate.

Parameters :
Name Type Optional Description
value boolean No
  • The fetch flag.
Returns : void
stopAfter
getstopAfter()

Returns the stopAfter value.

Returns : number
setstopAfter(value: number)

Sets the stopAfter value.

Parameters :
Name Type Optional Description
value number No
  • The stopAfter value.
Returns : void
smartFilterId
getsmartFilterId()

The smart-object-name of the lookup's Smart Filter.

Returns : string
datasource
getdatasource()
Returns : SmartDataSource
setdatasource(value: SmartDataSource)
Parameters :
Name Type Optional
value SmartDataSource No
Returns : void
autocompleteField
getautocompleteField()
Returns : AutoCompleteComponent
setautocompleteField(value: AutoCompleteComponent)
Parameters :
Name Type Optional
value AutoCompleteComponent No
Returns : void
multiselectField
getmultiselectField()
Returns : MultiSelectComponent
setmultiselectField(value: MultiSelectComponent)

The Kendo MultiSelect rendered in multi (chip) mode. Emits on the lookup ready subject so the widget facade resolves its inner input element.

Parameters :
Name Type Optional
value MultiSelectComponent No
Returns : void
autocompleteComponent
getautocompleteComponent()
Returns : AutoCompleteComponent
enabled
getenabled()

Returns whether the lookup input is enabled.

Returns : boolean
setenabled(value: boolean)

Indicates whether the lookup's input and search button are enabled.

Parameters :
Name Type Optional
value boolean No
Returns : void
<!--
**************************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") -                  *
* www.consultingwerk.com and other contributors as listed                *
* below. All Rights Reserved.                                            *
*                                                                        *
*  Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY        *
*   KIND, either express or implied.                                     *
*                                                                        *
*  Contributors:                                                         *
*                                                                        *
**************************************************************************

--------------------------------------------------------------------------
    File        : smart-lookup.component.html
    Purpose     : Template for Smart Lookup.
    Author(s)   : Radu Nicoara
    Created     : Dec 07, 2017
--------------------------------------------------------------------------
-->
@if (_showLookupTemplateSignal() && _tableSignal()) {
                <smart-data-source
                    [smart-stop-after]="_stopAfterSignal()"
                    [smart-filter]="lookupFilter"
                    [smart-instance-name]="datasourceId" 
                    [smart-business-entity-name]="_businessEntitySignal()" 
                    [smart-partial-dataset]="_partialDatasetSignal()"
                    [smart-entity-table]="_tableSignal()"
                    [smart-entity-view]="entityView"
                    [smart-sort]="lookupQuerySort"
                    [smart-batch-size]="1"
                    [smart-auto-fetch]="false"
                    [smart-read-requests-cancellable]="true">
                </smart-data-source>
                }
                @if (_lookupLoadedOnceSignal() && _showLookupTemplateSignal() && _tableSignal()) {
                <smart-data-source
                    [smart-stop-after]="_stopAfterSignal()"
                    [smart-filter]="lookupFilter"
                    [smart-filter-source]="smartFilterId"
                    [smart-business-entity-name]="_businessEntitySignal()"
                    [smart-entity-table]="_tableSignal()"
                    [smart-entity-view]="entityView"
                    [smart-sort]="lookupDialogQuerySort || lookupQuerySort"
                    [smart-instance-name]="lookupDialogDatasourceId"
                    [smart-partial-dataset]="_partialDatasetSignal()"
                    [smart-batch-size]="100"
                    [smart-auto-fetch]="false"
                    [smart-read-requests-cancellable]="true">
                </smart-data-source>
                }
                <div [hidden]="!_visibleSignal()">
                    @if (!_multipleSignal()) {
                    <kendo-autocomplete
                        [ngClass]="{ numeric: _numericSignal() }"
                        class="form-control"
                        [disabled]="!_enabledSignal()"
                        (focus)="focus.next()"
                        (blur)="blur.next()"
                        #autocompleteField
                        [filterable]="true"
                        (keydown)="handleKeyDown($event)"
                        (valueChange)="handleValueChange($event)"
                        (filterChange)="handleFilterChange($event)"
                        [valueField]="_keyFieldSignal()"
                        [suggest]="_disableAutocompleteSignal() !== true"
                        [clearButton]="false"
                        [data]="_autocompleteItemsSignal()">
                            <ng-template kendoDropDownListNoDataTemplate>

                            </ng-template>
                            <ng-template kendoSuffixTemplate>
                                <button kendoButton fillMode="flat" themeColor="base" (click)="lookup()" iconClass="fa-solid fa-magnifying-glass" class="smart-input-button">
                                </button>
                                @for (button of editorButtons(); track button.key) {
                                    <button
                                        kendoButton
                                        fillMode="flat"
                                        themeColor="base"
                                        [iconClass]="button.icon"
                                        [smartEditorButton]="button"
                                        (editorButtonClicked)="onEditorButtonClicked.emit($event)">
                                        {{ button.label }}
                                    </button>
                                }
                            </ng-template>
                    </kendo-autocomplete>
                    } @else {
                    <kendo-multiselect
                        #multiselectField
                        [ngClass]="{ numeric: _numericSignal() }"
                        class="form-control"
                        [disabled]="!_enabledSignal()"
                        (focus)="focus.next()"
                        (blur)="blur.next()"
                        [filterable]="true"
                        [allowCustom]="false"
                        [data]="getMultiSelectData()"
                        [valuePrimitive]="true"
                        [value]="getMultiSelectValues()"
                        [clearButton]="true"
                        [popupSettings]="{ appendTo: multiselectPopupAppendTo }"
                        (open)="handleMultiOpen($event)"
                        (filterChange)="handleMultiFilterChange($event)"
                        (valueChange)="handleMultiValueChange($event)">
                            <ng-template kendoMultiSelectNoDataTemplate>
                            </ng-template>
                            <ng-template kendoSuffixTemplate>
                                <button kendoButton fillMode="flat" themeColor="base" (click)="lookup()" iconClass="fa-solid fa-magnifying-glass" class="smart-input-button">
                                </button>
                                @for (button of editorButtons(); track button.key) {
                                    <button
                                        kendoButton
                                        fillMode="flat"
                                        themeColor="base"
                                        [iconClass]="button.icon"
                                        [smartEditorButton]="button"
                                        (editorButtonClicked)="onEditorButtonClicked.emit($event)">
                                        {{ button.label }}
                                    </button>
                                }
                            </ng-template>
                    </kendo-multiselect>
                    }
               </div>
                <ng-template #dialogTemplate>
                    <div class="dialog-content-wrapper h-100 d-flex flex-column zoom-scroll-guard">
                        <div class="dialog-content-wrapper-inner zoom-scroll-guard">
                            @if (_showFilterSignal() && !!_datasourceSignal() && !!smartFilterId) {
                            <smart-filter 
                                orientation="horizontal"
                                class="w-100"
                                style="flex: 0;" 
                                [smart-instance-name]="smartFilterId"
                                [filter-fields-initial]="smartFilterFields" 
                                [filter-fields-optional]="optionalFilterFields">
                            </smart-filter>
                            }
                            <smart-grid 
                                style="flex: 1; min-height: 0;"
                                #lookupDialogGrid
                                (onDoubleClicked)="onGridDoubleClicked()" 
                                (onOpen)="handleAutocompleteDropdown($event)"
                                (onReady)="handleLookupDialogGridReady(lookupDialogGrid)"
                                (selection-changed)="handleDialogGridSelectionChanged($event)"
                                [smart-grid-layout]="_dialogGridLayout"
                                [smart-data-source]="lookupDialogDatasourceId"
                                [smart-instance-name]="lookupDialogInstanceId" 
                                [disable-text-selection]="true"
                                [ignoreFlexboxLayout]="true"
                                [allowRememberFilters]="false">
                            </smart-grid>
                        </div>
                        <div class="lookup-buttons-container">
                            <button type="button" kendoButton themeColor="primary" (click)="closeLookupDialog('ok')">
                                OK
                            </button>
                            <button type="button" kendoButton (click)="closeLookupDialog('cancel')">
                                Cancel
                            </button>
                        </div>
                    </div>
               </ng-template>
               <ng-template #dialogNamedQueryTemplate>
                    <div class="dialog-content-wrapper h-100 d-flex flex-column zoom-scroll-guard" >
                        <div class="dialog-content-wrapper-inner zoom-scroll-guard">
                            <kendo-grid 
                                #externalDataGrid 
                                (selectionChange)="externalDataGridSelectionChanged($event)"
                                (dblclick)="onGridDoubleClicked()" 
                                [style.height]="'100%'" 
                                [data]="externalDialogData | async"
                                [filterable]="
                                    $safeNavigationMigration(
                                        _smartGridLayoutSignal()?.filterable
                                    )
                                "
                                [selectable]="multiple ? multipleSelectableSettings : true"
                                [loading]="externalDataLoading">
                                @for (column of _smartGridLayoutSignal()?.columns; track column.field) {
                                <kendo-grid-column [field]="column.field"
                                    [title]="column.title" [format]="column.format" [filter]="column.type">
                                </kendo-grid-column>
                                }
                            </kendo-grid>
                        </div>

		<div class="lookup-buttons-container">
			<button
				type="button"
				kendoButton
				themeColor="primary"
				(click)="closeLookupDialog('ok')"
			>
				OK
			</button>
			<button
				type="button"
				kendoButton
				(click)="closeLookupDialog('cancel')"
			>
				Cancel
			</button>
		</div>
	</div>
</ng-template>

./smart-lookup.component.css

/**********************************************************************
 * Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") -              *
 * www.consultingwerk.com and other contributors as listed            *
 * below. All Rights Reserved.                                        *
 *                                                                    *
 *  Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY    *
 *   KIND, either express or implied.                                 *
 *                                                                    *
 *  Contributors:                                                     *
 *                                                                    *
 **********************************************************************/
/*------------------------------------------------------------------------
    File        : smart-lookup.component.css
    Purpose     : Styles for Smart Lookup.
    Author(s)   : Radu Nicoara
    Created     : Dec 07, 2017
  ----------------------------------------------------------------------*/

::ng-deep kendo-autocomplete.numeric kendo-searchbar input {
    text-align: right;
    transition: 0.15s padding ease-out;
    -moz-transition: 0.15s padding ease-out;
    -o-transition: 0.15s padding ease-out;
    -webkit-transition: 0.15s ease-out;
}

::ng-deep kendo-autocomplete.numeric kendo-searchbar input:hover,
::ng-deep kendo-autocomplete.numeric kendo-searchbar input:focus {
    padding-right: 25px;
}

::ng-deep [hidden] {
    display: none !important;
}

::ng-deep .lookup-window {
    z-index: 100000 !important;
}

/* Ensure all popup elements within lookup dialog appear above the dialog */
::ng-deep .lookup-window .k-animation-container,
::ng-deep .lookup-window .k-popup,
::ng-deep .lookup-window .k-list-container {
    z-index: 100001 !important;
}

/* Specifically target grid filter menus within lookup dialogs */
::ng-deep .lookup-window .k-grid-filter-menu,
::ng-deep .lookup-window .k-filtercell .k-dropdown .k-dropdown-wrap,
::ng-deep .lookup-window .k-grid-header .k-dropdown .k-dropdown-wrap,
::ng-deep .lookup-window .k-grid .k-animation-container {
    z-index: 100001 !important;
}

/* 
 * Handle popups that may be rendered at document root level
 * Target Kendo filter and dropdown popup elements specifically
 */
::ng-deep .k-animation-container.k-animation-container-shown {
    z-index: 100001 !important;
}

::ng-deep .k-popup.k-popup-flush {
    z-index: 100001 !important;
}

.lookup-buttons-container {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    gap: var(--kendo-window-buttongroup-spacing, var(--kendo-spacing-2, 0.5rem));
}

.lookup-buttons-container > .k-button {
    flex: 1 !important;
}
::ng-deep .lookup-window .k-window-titlebar .k-window-titlebar-actions .k-button:nth-of-type(1),
::ng-deep .lookup-window .k-window-titlebar .k-window-titlebar-actions .k-button:nth-of-type(2) {
    visibility: hidden;
}

.dialog-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: 100%;
    overflow-y: visible;
}

.dialog-content-wrapper-inner {
    flex: 1; 
    min-height: 0; 
    overflow-y: visible;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dialog-content-wrapper smart-grid {
    flex: 1 1 auto;
    min-height: 0 !important;
}

../common/styles/zoom-scroll-guard.scss

/**********************************************************************
 * Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") -              *
 * www.consultingwerk.com and other contributors as listed            *
 * below. All Rights Reserved.                                        *
 *                                                                    *
 *  Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY    *
 *   KIND, either express or implied.                                 *
 *                                                                    *
 *  Contributors:                                                     *
 *                                                                    *
 **********************************************************************/
/*------------------------------------------------------------------------
    File        : zoom-scroll-guard.scss
    Purpose     : Styles for zoom scroll guard.
    Author(s)   : Oana Sucigan
    Created     : Nov 28, 2025
  ----------------------------------------------------------------------*/

.zoom-scroll-guard {
    contain: layout;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""