Multiple select dropdown

Updated at:

Introduction

A multiple select dropdown is a form input component that consists of a title label and a selection box. When a user interacts with the component, a dropdown menu appears that allows them to select multiple items from a list. Common scenarios for this component include multi-type filtering and selecting product category tags.

image

Configuration items

Category

Configuration

Example

Description

Content

Option list

Configure options manually or through mapping. For manual configuration, directly set each `currentItem`. For mapping, configure a data source (array). Each `currentItem` must include `label` and `value` properties.

Default value

The default selected option.

Placeholder content

The placeholder content.

Label

The form label. For more information, see Common form properties.

Interaction

Hidden

Hides the component. For more information, see Common properties.

Search

Displays the search icon.

Loading

Displays the loading animation.

Disabled

If enabled, the component cannot be used.

Validation

Form validation. For more information, see Common form properties.

Style

Margin

The outer margin. For more information, see Common properties.

Clear button

Specifies whether to display the clear button.

Variant

Various component variants. The available CSS styles may differ for each variant. For more information, see the official Ant Design documentation.

Empty state text

The text to display when the dropdown option list is empty.

CSS Style

Border radius

The border radius.

Option font size

The font size for dropdown options.

Theme font size

The theme font size.

Label font size

The font size for the label.

Properties and methods

Name

Type

Example

Description

value

string

multipleSelect.value

The selected content of the component.

labelText

string

multipleSelect.labelText

The text content of the component's label.

disabled

boolean

multipleSelect.disabled

Indicates whether the component is disabled.

loading

boolean

multipleSelect.loading

Indicates whether the component is in a loading state.

data

array

multipleSelect.data

The option list of the component.

hidden

boolean

multipleSelect.hidden

Indicates whether the component is hidden.

validationStatus

boolean

multipleSelect.validationStatus

The status of the component after validation.

validationMessage

string

multipleSelect.validationMessage

The message displayed after component validation.

blur

func

multipleSelect.blur()

Removes focus from the component.

focus

func

multipleSelect.focus()

The component gains focus.

validate

func

multipleSelect.validate()

Validates the component.

setValue

func

multipleSelect.setValue([])

Sets the selected options for the component.

setDisabled

func

multipleSelect.setDisabled(true)

Sets whether the component is disabled.

setHidden

func

multipleSelect.setHidden(true)

Sets the hidden state of the component.

clearValue

func

multipleSelect.clearValue()

Clears the `value` of the component.

clearHidden

func

multipleSelect.clearHidden()

Clears the `hidden` value of the component.

clearValidate

func

multipleSelect.clearValidate()

Clears the validation message of the component.

Event callbacks

Configuration

Description

The event that is triggered after the selected item changes.