Skip to main content

Select Box

A sub namespace of UI, exclusive for select box operations

//accessing to ui.selectBox methods
SW.UI.SelectBox.{methodName}

getLookupByEndpoint

Description

This method can be used to get a SelectBox's datasource.

Method(s)

1 function getLookupByEndpoint(options: any, endpoint: string): Promise<any>;
ParameterTypeRequiredDefaultsDescription
optionsanytrueSearchValue, skip and take
endpointstringtrueEndpoint to retrieve the data

Basic Usage

SW.UI.selectBox.getLookupByEndpoint({searchValue: '', skip: 0, take: 20}, "departments/lookup");

setListWidth

Description

This method can be used to set a SelectBox's list width according to the largest item passed in element's datasource.

Method(s)

1 function setListWidth(selectBox: {component: dxSelectBox, element: HTMLElement}): void
ParameterTypeRequiredDefaultsDescription
componentdxSelectBoxtrueTarget select box
elementHTMLElementtrue

Basic Usage

SW.UI.selectBox.setListWidth(selectBox);