SearchSelect
Select
SearchSelect
Select
The dropdown layer is now unified on the TxPopover → TxTooltip → TxBaseAnchor chain for consistent overlay behavior.
Basic Usage
SearchSelect
Demo loads on client.
Remote Search
When remote=true, input changes (debounced) and Enter trigger the search event; fetch externally and write results back to options.
SearchSelect (remote)
Demo loads on client.
Notes
- Local mode filters by
options.labeland shows all when input is empty. - Remote mode requires updating
optionsin thesearchevent; results are not cached. - Closing the dropdown keeps input and panel state; reopening does not auto-reset.
API
Props
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | string | number | '' | TextValue(v-model) |
placeholder | string | 'Search' | Description for placeholder. |
disabled | boolean | false | Description for disabled. |
clearable | boolean | true | Description for clearable. |
options | TxSearchSelectOption[] | [] | Description for options. |
loading | boolean | false | Description for loading. |
remote | boolean | false | Description for remote. |
searchDebounce | number | 200 | Description for searchDebounce. |
dropdownMaxHeight | number | 280 | Description for dropdownMaxHeight. |
dropdownOffset | number | 6 | Description for dropdownOffset. |
panelVariant | 'solid' | 'dashed' | 'plain' | 'solid' | Text(TxCard variant) |
panelBackground | 'pure' | 'mask' | 'blur' | 'glass' | 'refraction' | 'refraction' | Card background style |
panelShadow | 'none' | 'soft' | 'medium' | 'soft' | Text(TxCard shadow) |
panelRadius | number | 18 | Description for panelRadius. |
panelPadding | number | 6 | Description for panelPadding. |
Events
| Event | Params | Description |
|---|---|---|
update:modelValue | (v: string | number) | v-model Text |
change | (v: string | number) | Description for change. |
search | (q: string) | Description for search. |
select | (opt: TxSearchSelectOption) | Description for select. |
open | - | Description for open. |
close | - | Description for close. |
Types
export interface TxSearchSelectOption {
value: string | number
label: string
disabled?: boolean
}
Was this helpful?