src/ui/lookup/smart-lookup.component.ts
AbstractSmartViewerFieldComponent
| changeDetection | ChangeDetectionStrategy.Eager |
| providers |
SmartLookupBindingService
SmartLookupMultiSelectService
|
| selector | smart-lookup |
| styleUrls | ./smart-lookup.component.css, |
| templateUrl | ./smart-lookup.component.html |
| viewProviders |
|
constructor(elementRef: ElementRef, errorHandler: SmartErrorHandlerService, vcRef: ViewContainerRef, smartWindowService: SmartWindowService, widgetFacadeFactory: WidgetFacadeFactory, changeDetector: ChangeDetectorRef, viewerHelper: SmartViewerHelperService<AbstractFrameComponent>, formInstanceService: SmartFormInstanceService)
|
|||||||||||||||||||||||||||
|
Parameters :
|
| 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 |
| 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
|
| keydown | ||||
Arguments : '$event'
|
||||
keydown(event: KeyboardEvent)
|
||||
|
Hotkeys handler
Parameters :
|
| callNativeMethod | |||||||||
callNativeMethod(methodName: string, args: any[])
|
|||||||||
|
Parameters :
Returns :
any
|
| clear |
clear()
|
|
Returns :
void
|
| closeLookupDialog | ||||||
closeLookupDialog(result: string)
|
||||||
|
Parameters :
Returns :
void
|
| externalDataGridSelectionChanged | ||||||
externalDataGridSelectionChanged(selectionEvent: SelectionEvent)
|
||||||
|
Parameters :
Returns :
void
|
| getDataSource |
getDataSource()
|
|
Returns :
Observable<AbstractSmartDataSource>
Observable |
| getNativeProperty | ||||||
getNativeProperty(propertyName: string)
|
||||||
|
Parameters :
Returns :
any
|
| handleAutocompleteDropdown | ||||||
handleAutocompleteDropdown(event: any)
|
||||||
|
Parameters :
Returns :
void
|
| handleKeyDown | ||||||
handleKeyDown($event: unknown)
|
||||||
|
Parameters :
Returns :
void
|
| Async handleValueChange | ||||||||
handleValueChange(value: any)
|
||||||||
|
Handles the change in selected value from the autocomplete component.
Parameters :
Returns :
any
A promise that resolves when the value change has been processed. |
| hotkeysHandler | ||||||
hotkeysHandler(event: KeyboardEvent)
|
||||||
Decorators :
@HostListener('keydown', ['$event'])
|
||||||
|
Hotkeys handler
Parameters :
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 :
Returns :
void
|
| setNativeProperty |
setNativeProperty(propertyName: string, value: any)
|
|
Returns :
void
|
| 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()
|
| 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 |
| 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()
|
| numeric | ||||||
getnumeric()
|
||||||
|
Returns whether numeric input is enabled.
Returns :
boolean
|
||||||
setnumeric(value: boolean)
|
||||||
|
Parameters :
Returns :
void
|
| name | ||||||||
getname()
|
||||||||
|
Returns the lookup name.
Returns :
string
|
||||||||
setname(value: string)
|
||||||||
|
Sets the lookup name.
Parameters :
Returns :
void
|
| beforePerformLookup | ||||||||
getbeforePerformLookup()
|
||||||||
|
Returns the before-perform-lookup handler.
Returns :
BeforePerformLookupEventHandler
|
||||||||
setbeforePerformLookup(value: BeforePerformLookupEventHandler)
|
||||||||
|
Sets the before-perform-lookup handler.
Parameters :
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 :
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 :
Returns :
void
|
| helpUrl | ||||||
gethelpUrl()
|
||||||
|
Returns :
string
|
||||||
sethelpUrl(value: string)
|
||||||
|
Parameters :
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 :
Returns :
void
|
| visible | ||||||||
getvisible()
|
||||||||
|
Returns whether the lookup is visible.
Returns :
boolean
|
||||||||
setvisible(value: boolean)
|
||||||||
|
Sets whether the lookup is visible.
Parameters :
Returns :
void
|
| id | ||||||||
getid()
|
||||||||
|
Returns the lookup element id.
Returns :
string
|
||||||||
setid(value: string)
|
||||||||
|
Sets the lookup element id.
Parameters :
Returns :
void
|
| autoComplete | ||||||
setautoComplete(value: string)
|
||||||
|
The lookup's autocomplete options.
Parameters :
Returns :
void
|
| disableAutocomplete | ||||||||
getdisableAutocomplete()
|
||||||||
|
Returns whether autocomplete is disabled.
Returns :
boolean
|
||||||||
setdisableAutocomplete(value: boolean)
|
||||||||
|
Sets whether autocomplete is disabled.
Parameters :
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 :
Returns :
void
|
| delimiter | ||||||||
getdelimiter()
|
||||||||
|
Returns the configured delimiter. May be undefined; the resolved value
(with the
Returns :
string
|
||||||||
setdelimiter(value: string)
|
||||||||
|
Sets the delimiter that separates multiple values.
Parameters :
Returns :
void
|
| dialogOptions | ||||||||
getdialogOptions()
|
||||||||
|
Returns the dialog options string.
Returns :
string
|
||||||||
setdialogOptions(value: string)
|
||||||||
|
Sets the dialog options string.
Parameters :
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 :
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 :
Returns :
void
|
| keyValueModel | ||||||
getkeyValueModel()
|
||||||
|
Returns :
any
|
||||||
setkeyValueModel(value: any)
|
||||||
|
The "invisible" part of the lookup value (ex. ID, GUID)
Parameters :
Returns :
void
|
| smartModel | ||||||
getsmartModel()
|
||||||
|
Returns :
any
|
||||||
setsmartModel(value: any)
|
||||||
|
The "visible" value of the lookup value
Parameters :
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 :
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 :
Returns :
void
|
| dialogTitle | ||||||||
getdialogTitle()
|
||||||||
|
Returns the lookup dialog title.
Returns :
string
|
||||||||
setdialogTitle(value: string)
|
||||||||
|
Sets the lookup dialog title.
Parameters :
Returns :
void
|
| key | ||||||||
getkey()
|
||||||||
|
Returns the lookup key field name.
Returns :
string
|
||||||||
setkey(value: string)
|
||||||||
|
Sets the lookup key field name.
Parameters :
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 :
Returns :
void
|
| keyFieldBinding | ||||||||
getkeyFieldBinding()
|
||||||||
|
Returns the key field binding expression.
Returns :
string
|
||||||||
setkeyFieldBinding(value: string)
|
||||||||
|
Sets the key field binding expression.
Parameters :
Returns :
void
|
| keyValue | ||||||||
getkeyValue()
|
||||||||
|
Returns the lookup key value.
Returns :
string
|
||||||||
setkeyValue(value: string)
|
||||||||
|
Sets the lookup key value.
Parameters :
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 :
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 :
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 :
Returns :
void
|
| keyValueFieldBinding | ||||||||
getkeyValueFieldBinding()
|
||||||||
|
Returns the key value field binding.
Returns :
string
|
||||||||
setkeyValueFieldBinding(value: string)
|
||||||||
|
Sets the key value field binding.
Parameters :
Returns :
void
|
| boundFields | ||||||||
getboundFields()
|
||||||||
|
Returns the bound fields expression.
Returns :
any
|
||||||||
setboundFields(value: any)
|
||||||||
|
Sets the bound fields expression.
Parameters :
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 :
Returns :
void
|
| filterValue | ||||||||
getfilterValue()
|
||||||||
|
Returns the parent filter value.
Returns :
string
|
||||||||
setfilterValue(value: string)
|
||||||||
|
Sets the parent filter value.
Parameters :
Returns :
void
|
| filterField | ||||||||
getfilterField()
|
||||||||
|
Returns the parent filter field.
Returns :
string
|
||||||||
setfilterField(value: string)
|
||||||||
|
Sets the parent filter field.
Parameters :
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 :
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 :
Returns :
void
|
| smartFilter | ||||||
getsmartFilter()
|
||||||
|
Gets the smartFilter
Returns :
SmartFilterDescriptor | string
|
||||||
setsmartFilter(value: SmartFilterDescriptor | string)
|
||||||
|
Sets the smartFilter property of a lookup, uses SmartFilterDescriptor or ABL strings
Parameters :
Returns :
void
|
| lookupFilter |
getlookupFilter()
|
|
Gets the lookupFilter, this returns beforePerformLookupFilter or the smartFilter property. If both are defined it will return the beforePerformLookupFilter.
Returns :
SmartFilterDescriptor | string
|
| smartFilterFields | ||||||
getsmartFilterFields()
|
||||||
|
Returns :
string
|
||||||
setsmartFilterFields(value: string)
|
||||||
|
Initial filter fields that should be activated within the lookup's Smart Filter.
Parameters :
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 :
Returns :
void
|
| foreignFields | ||||||
getforeignFields()
|
||||||
|
Returns :
string
|
||||||
setforeignFields(value: string)
|
||||||
|
Parameters :
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 :
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 :
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 :
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 :
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 :
Returns :
void
|
| serverSideSorting | ||||||
getserverSideSorting()
|
||||||
|
Returns whether server-side sorting is enabled.
Returns :
boolean
|
||||||
setserverSideSorting(value: boolean)
|
||||||
|
Parameters :
Returns :
void
|
| fetchDataOnNavigate | ||||||||
getfetchDataOnNavigate()
|
||||||||
|
Returns whether data is fetched on navigate.
Returns :
boolean
|
||||||||
setfetchDataOnNavigate(value: boolean)
|
||||||||
|
Sets whether data is fetched on navigate.
Parameters :
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 :
Returns :
void
|
| stopAfter | ||||||||
getstopAfter()
|
||||||||
|
Returns the stopAfter value.
Returns :
number
|
||||||||
setstopAfter(value: number)
|
||||||||
|
Sets the stopAfter value.
Parameters :
Returns :
void
|
| smartFilterId |
getsmartFilterId()
|
|
The smart-object-name of the lookup's Smart Filter.
Returns :
string
|
| datasource | ||||||
getdatasource()
|
||||||
|
Returns :
SmartDataSource
|
||||||
setdatasource(value: SmartDataSource)
|
||||||
|
Parameters :
Returns :
void
|
| autocompleteField | ||||||
getautocompleteField()
|
||||||
|
Returns :
AutoCompleteComponent
|
||||||
setautocompleteField(value: AutoCompleteComponent)
|
||||||
|
Parameters :
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 :
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 :
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;
}