nf-variable-select
Searchable popover variable picker with field aliases, grouped results and custom group labels. The default slot supplies the trigger.
Examples
Basic usage
Loading example…
Basic usage
Advanced usage
Loading example…
Advanced usage
Props
Text props follow the library language when omitted; defaults below use this language.
| Parameter | Description | Type | Options | Default |
|---|---|---|---|---|
data | Data to display or restore. | VariableItem[] | — | [] |
valueAlias | Alias for the value field. | string | — | 'name' |
keyAlias | Alias for the key field. | string | — | 'paramId' |
placement | Popup placement. | string | top / top-start / top-end / bottom / bottom-start / bottom-end / left / left-start / left-end / right / right-start / right-end | 'bottom' |
width | Popup width. | string | number | — | '160' |
trigger | Trigger mode; manual is controlled externally through visible. | string | click / focus / hover / manual | 'click' |
visible | Controlled visibility; supports v-model:visible. | boolean | — | undefined |
popperClass | Custom class for the popup. | string | — | '' |
disabled | Whether to disable the component. | boolean | — | false |
offset | Popup offset in pixels. | number | — | 0 |
transition | Popup transition name. | string | — | 'fade-in-linear' |
visibleArrow | Whether to show the popup arrow. | boolean | — | true |
popperOptions | Popper 2 options; use modifiers to customize positioning. | Record<string, unknown> | — | {} |
openDelay | Show delay for hover, in milliseconds. | number | — | undefined |
closeDelay | Hide delay for hover, in milliseconds. | number | — | 200 |
tabindex | tabindex of the trigger. | number | — | 0 |
noMatchDesc | Customize the “No matching data” text. | string | — | No matching data |
placeholder | Customize the “Search by variable name” text. | string | — | Search by variable name |
size | Control size; mini maps to small and medium to default. | string | mini / small / medium / default / large | 'mini' |
groupable | Enable grouping. | boolean | — | false |
groupKey | Grouping field; required when groupable is true. | string | — | '' |
groupLabels | Group label mapping: keys are groupKey values and values are display text. | Record<string, string> | — | {} |
Events
| Event | Description | Payload |
|---|---|---|
variate-click | Fires when a variable is clicked; returns the selected object. | (item: VariableItem) |
after-enter | Fires after the show transition finishes. | — |
hidden | Fires when hidden. | — |
show | Fires when shown. | — |
after-leave | Fires after the hide transition finishes. | — |
update:visible | Update the bound value. | (visible: boolean) |
Slots
| Parameter | Description | Payload |
|---|---|---|
default | DOM content that triggers the dropdown. | — |
Exposed methods and state
keywordlistgroupedListhandleItem(item)
Migration notes
Vue 3 uses modelValue / update:modelValue; legacy value, update:value and input remain available on selection components. The implementation uses public Element Plus APIs, not Element UI internals. mini maps to small; medium maps to default.
