Dropdown v2

  • Shows menus and dropdowns.

Example Link

Features/Functionality

  • Shows menus and dropdown.

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.
selectionTypemulti/single/rangeType of selection required.
selectedValuesarray typeSelected values.

selectionRange

object typeNumber of values that can be selected.

data

array of objects typeData to show in list.

options

object typeOptions for component.
isDisabledboolean typeIs dropdown disabled.
onClickstring typeMethod to be called on focus out.
elmInstanceany typeIcon element instance.
customParentContextany typeParent Context to call callback methods.

selectionRange

PropertyValueDescriptionValue
minnumber typeMinimum number of selections
maxnumber typeMaximum number of selections

data

PropertyValueDescription
idstring typeId of option
levelIdstring typeId of level
levelTypegroup/valueType of level
valuestring typeValue of item
labelstring typeLabel to be shown of item
isSelectedboolean typeIs option selected by default
titlestring typeHover value
imgSrcstring typeImage Source to be shown
iConSchemaicon typeIcon to be shown
additionalDataobject typeAny Additional Data
clickUrlstring typeURL to be opened on click
childItemsarray of objects typeChild Items

options

PropertyValueDescription
maxCharsnumber typeMaximum characters to be shown.

levelOptions

object typeOptions based on levels
isRadioboolean typeNeed radio buttons
isCheckboxboolean typeNeed checkboxes

levelOptions

PropertyValueDescription
displayTypehorizontal/verticalHow to Show data
groupSeparatorblank/solid/dashedSeparator between groups
valueSeparatorblank/solid/dashed/dotted/starredSeparator between values
headingValSeparatorblank/solid/dashed/dotted/starredSeparator between values
splitGroupValuesboolean typeGroup Value to be splitted in next column
autoLoadChildboolean typeValues to be shown
groupHeadingStylefilled/underlinedStyle of group heading
childItemsTypearrows/colorHighlight/colorFillStyle of showing child items relation
itemsAlignmentleft/rightAlignment of the text
maxValuesnumber typeMaximum values
maxGroupsnumber typeMaximum Groups
childIndentationtop/adjacentWhere should child elements start

style

object typeStyle of the element.

style

PropertyValueDescription
bgColorstring typeBackground color of child items
colorstring typeColor of child items
heightnumber typeHeight of the child items
widthnumber typeWidth of the child items

Schema Example

let schema = {
id: '',
type: 'menu',
data: [
{
id: '1',
levelId: 'W_STATE'
label:'Karnataka',
levelType: 'value',
value: 'kar',
childItems: [
{
id: '1',
levelId: 'W_CITY'
label:'Bangalore',
levelType: 'value',
value: 'blr',
}
]
},
{
id: '1',
levelId: 'W_STATE'
label:'Kerela',
levelType: 'value',
value: 'ker',
childItems: [
{
id: '1',
levelId: 'W_CITY'
label:'Thiruvananthpuram',
levelType: 'value',
value: 'thir',
}
]
},
],
options: {
levelOptions: {
W_STATE: {
displayStyle: 'horizontal',
splitGroupValues: true,
groupHeadingStyle: 'filled'
},
W_CITY: {
displayStyle: 'horizontal',
autoLoadChild: true
}
}
}
}