dropdown-select
<ai-portal.dropdown-select>
构件 ai-portal.dropdown-select
下拉选择器组件,提供选项列表供用户选择,支持搜索过滤功能。
Examples
Basic
基础用法,提供选项列表:
With Search
启用搜索功能:
Loading State
加载状态显示:
Custom Width
自定义标签和下拉框宽度:
With Disabled Options
包含禁用选项:
Complex Example
综合示例,包含所有功能:
Properties
Name | Description | Type | Default | Required |
---|---|---|---|---|
value | string | |||
options | DropdownOptions[] | |||
labelMaxWidth | string | number | |||
loading | boolean | |||
searchPlaceholder | string | |||
dropdownContentStyle | React.CSSProperties | |||
dropdownMaxWidth | string | number | "500px" | ||
showSearch | 是否展示搜索框 | boolean |
Events
Name | Description | Event Detail |
---|---|---|
change | DropdownOptions |
Type references
DropdownOptions
Name | Description | Type | Default | Required |
---|---|---|---|---|
label | string | ✅ | ||
value | string | ✅ | ||
disabled | boolean | |||
[key: string] | unknown |