ChipList

The chip list is a small block of essential information, mostly used on contacts or filter tags.

Properties

avatarIconCss String

Specifies the CSS classes to customize the avatar icon.

Default: ""

avatarText String

Specifies the text for the avatar.

Default: ""

chips String[] Number[] Chip[]

Specifies the list of chips to be included in the chip list.

Default: []

cssClass String

Specifies CSS classes to customize the appearance of the chip list.

Default: ""

enabled Boolean

Specifies whether the chip list is enabled or not.

Default: true

enableDelete Boolean

Specifies whether to enable or disable the option to allow chips to be deleted from the list.

Default: false

enableRtl Boolean

Specifies whether to render the control in right to left direction.

Default: false

enableState Boolean

Specifies whether to persist the state of the control between page loads.

No properties are saved to state at this time.

Default: false

htmlAttributes {:}

Specifies additional HTML attributes, such as title, styles, class, id, and name, in a key-value pair format that will be appended to the HTML element. If both the property and equivalent HTML attributes are configured, then the control overrides the property value with the HTML attributes.

Default: {}

leadingIconCss String

Specifies the CSS classes to customize the leading icon.

Default: ""

leadingIconUrl String

Specifies a URL to set a leading CSS background image.

Default: ""

locale String

Specifies the culture and localization value for this control, overriding the globally defined value.

Default: en-US

selectedChips String[] Number[] Number

Specifies the chip items currently selected in the chip list.

Default: []

selection Selection

Specifies the chip list selection type.

Default: None

text String

Specifies text for a single chip when there are no chips in the chip’s property.

Default: ""

trailingIconCss String

Specifies the CSS classes to customize the trailing icon.

Default: ""

trailingIconUrl String

Specifies a URL to set a trailing CSS background image.

Default: ""

Methods

add

Adds a new chip(s) to the chip list.

Parameter Type Description
eventName String Number Chip String[] Number[] Chip[] Specifies chip(s) to add to the chip list.

Returns: Void

addEventListener

Attaches an event handler to a specified element. This method allows you to set up a function that will be called whenever the specified event is delivered to the target element.

Parameter Type Description
eventName String A string value that specifies the name of the event.
handler Function Specifies the function to run when the event is triggered.

Returns: Void

appendTo

Appends the control to the specified HTML element.

Parameter Type Description
selector String HTMLElement The select to a specified HTML element or an HTML element where the control will be appended to.

Returns: Void

dataBind

Applies all pending property changes to the control.

Returns: Void

destroy

Destroys the Aware instance, detaches all related events, removes attributes, css classes and restores the root element.

Returns: Void

getData

Gets the data object for the given index or HTML element.

Parameter Type Description
indexes Number HTMLElement Specifies the index of the chip to get the data object for.

Returns: ChipDataArgs

getLocalData

Gets the current properties values for the accordion that will be persisted to the state.

Returns: String

getRootElement

Gets the root element of the control.

Returns: HTMLElement

getSelectedChips

Gets the currently selected chips in the chip list.

Returns: SelectedItem SelectedItems

getStateData

Gets the current persisted state data for the control.

Returns: String

refresh

Applies all pending property changes to the accordion and re-renders the control.

Returns: Void

remove

Removes the chip item(s) by index or by HTML element.

Parameter Type Description
indexes Number Number[] HTMLElement HTMLElement[] Specifies the indexes or the HTML elements of the chips to be removed.

Returns: Void

removeEventListener

Removes the attached event handler for the specified event listener.

Parameter Type Description
eventName String A string value that specifies the name of the event to be removed.
handler Function Specifies the function to be removed.

Returns: Void

select

Specifies the indexes or the HTML elements of the chips to be selected.

Parameter Type Description
indexes Number Number[] HTMLElement HTMLElement[] Specifies the indexes or the HTML elements of the chips to be removed.

Returns: Void

Events

beforeClick EmitType<ClickEventArgs>

Event callback that is raised before the click event is triggered.

click EmitType<Event>

Event callback that is raised when a chip list item is clicked.

created EmitType<CreatedEventArgs>

Event callback that is raised when the control has been created.

delete EmitType<DeleteEventArgs>

Event callback that is raised before the chip list item is deleted.

deleted EmitType<DeletedEventArgs>

Event callback that is raised when the chip list item is deleted.