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>;
Parameter | Type | Required | Defaults | Description |
---|---|---|---|---|
options | any | true | SearchValue, skip and take | |
endpoint | string | true | Endpoint 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
Parameter | Type | Required | Defaults | Description |
---|---|---|---|---|
component | dxSelectBox | true | Target select box | |
element | HTMLElement | true |
Basic Usage
SW.UI.selectBox.setListWidth(selectBox);