Dropdown

  • Shows dropdown with single and multi select.

Example Link

Features/Functionality

  • Shows dropdown.
  • Range of selections can be given.
  • Component is responsive.
  • It is cross browser compatible. (Edge, Firefox, chrome).

Basic Usage

Dependencies

Definition

<cst-s-dropdown schema.bind="${schema}"></cst-s-dropdown>

Schema Description

AttributeValueDescription
idstring typeIdentifier for component.
labelstring typeLabel to show in component.

data

array of objects typeData to show in list.

dataAPI

object typeAPIs to get data.

options

object typeOptions for component.

selectionRange

object typeNumber of values that can be selected.
isDisabledboolean typeIs dropdown disabled.
isRequiredboolean typeIs selection in dropdown required.
selectionTypemulti/single/rangeType of selection required.
selectedValuesarray typeSelected values.

style

object typeStyle properties of component.
onFocusOutstring typeMethod to be called on focus out.
elmInstanceany typeIcon element instance.
customParentContextany typeParent Context to call callback methods.

data

PropertyValueDescriptionValue
idstring typeId of option
valuestring typeValue of option
labelstring typeLabel to be shown of option
isSelectedboolean typeIs option selected by default

dataAPI

PropertyValueDescriptionValue
idAPIobject typeAPI details to get all options ids
valuesAPIobject typeAPI details to get all options values
searchAPIobject typeAPI details to be called on search

selectionRange

PropertyValueDescriptionValue
minnumber typeMinimum number of selections
maxnumber typeMaximum number of selections

options

PropertyValueDescriptionValue
isAutoSuggestboolean typeAuto suggest on/off
showSelectedSectionboolean typeShow selected section/Chips
isSearchboolean typeSearch bar needed
maxCharsnumber typeMaximum characters to be shown in rows/chips
isRadioboolean typeNeed radio buttons
isCheckboxboolean typeNeed checkboxes

style

PropertyValueDescriptionValue
widthnumber typeWidth of dropdown
heightnumber typeHeight of dropdown list

Schema Example

let schema = {
id: '',
data: [
{
id: '',
value: '',
label: ''
}
],
dataAPI: {
idAPI:{},
valuesAPI:{},
searchAPI:{}
},
selectionRange: {
min:'',
max:''
},
isDisabled: true/false,
isRequired: true/false,
options: {
isAutoSelect: true/false,
showSelectedSelection: true/false,
isSearch: true/false,
maxChars: ''
},
style: {
width:'',
height: ''
}
}