For vue2 projects, use @94ai/common-ui
LLMs.md

nf-virtual-select ​

Standard/virtual select supporting single/multiple selection, select-all, aliases, keyword highlighting, comma-separated exact matches, remote filters, option slots and scroll methods.

Examples ​

Event and property configuration: method one ​

Loading example…
Event and property configuration: method one

Event and property configuration: method two ​

Loading example…
Event and property configuration: method two

Keyword highlighting ​

Loading example…
Keyword highlighting

Props ​

Descriptions preserve common-ui semantics; defaults and signatures follow the current Vue 3 implementation. Compatibility props do not enable unsupported legacy rendering.

AttributeDescriptionTypeValuesDefault
modelValue / v-model (value)Bound value; value remains compatible; prefer v-model in Vue 3SelectModelValue—undefined
tagCustom rendering tag; div or custom-select-dropdown displays an inline liststring | Component—'el-select'
keyValueFields used for option label and value[string, string]—['label', 'value']
optionsList of selectable optionsSelectOption[]—[]
itemOptionsConfigure list properties and events together; event names accept kebab-case or camelCaseRecord<string, unknown>—{}
virtualListEnable virtual scrollingboolean—false
dataKeyUnique virtual row key: field name or functionstring | ((row: SelectOption) => string | number)—'templateId'
dataComponentCustom option component receiving source, index and extraPropsComponent—undefined
estimateSizeEstimated row height in pxnumber—34
keepsMinimum inline virtual window; dropdown virtualization is managed by SelectV2number—30
heightScrollable list heightstring—'245px'
widthSelector widthstring—'100%'
maxWidthMaximum selector widthstring—undefined
showTipShow option tooltipboolean—true
multipleEnable multiple selectionboolean—false
selectAllShow select-all controlboolean—false
keywordHighlightHighlight search keywordboolean—true
keywordLabelAliasCompatibility field; highlighting uses text nodes, without HTML injectionstring—'keywordHighlightLabel'
disabledDisable interactionboolean—Inherited configuration
sizeInput size; mini / medium map to small / defaultSelectSizesmall / default / large / mini / mediumInherited configuration
clearableShow the clear selection controlboolean—false
collapseTagsCollapse selected tags in multiple modeboolean—multiple
multipleLimitMaximum selected items; 0 means unlimitednumber—0
autocompleteInput autocomplete attributestring—'off'
placeholderInput placeholderstring—Locale configuration
loadingLoading stateboolean—false
loadingTextLoading messagestring—Locale configuration
noMatchTextNo-match text; can use the empty slotstring—Locale configuration
noDataTextEmpty list text; can use the empty slotstring—Locale configuration
popperClassDropdown CSS classstring—undefined
popperAppendToBodyTeleport dropdown to body; maps to Element Plus teleportedboolean—true
startInitial inline scroll indexnumber—0
offsetInitial inline scroll offset in pxnumber—0
directionCompatibility field; currently has no effectStringverticalundefined
pageModeCompatibility field; currently has no effectboolean—undefined
topThresholdTop threshold for totop; may fire repeatedlynumber—0
bottomThresholdBottom threshold for tobottom; may fire repeatedlynumber—0
rootTagInline list root tagString—'div'
wrapTagInline list wrapper tagString—'div'
wrapClassCompatibility field; currently has no effectString—undefined
wrapStyleInline list wrapper styleCSSProperties—undefined
itemTagInline row wrapper tagString—'div'
itemClassInline row CSS classString—undefined
itemClassAddExtra row class function (index, row)(index: number, row: SelectOption) => string—undefined
itemStyleInline row styleCSSProperties—undefined
itemScopedSlotsCompatibility field; currently has no effectObject—undefined
headerTagCompatibility field; currently has no effectString—undefined
headerClassCompatibility field; currently has no effectString—undefined
headerStyleCompatibility field; currently has no effectCSSProperties—undefined
footerTagCompatibility field; currently has no effectString—undefined
footerClassCompatibility field; currently has no effectString—undefined
footerStyleCompatibility field; currently has no effectCSSProperties—undefined
selectAllTextSelect-all labelstring—Locale configuration
reserveKeywordKeep the search keyword after selectionboolean—true
filterableEnable searchingboolean—false
filterMethodCustom filtering function(query: string) => void | Promise<void>—undefined
remoteUse remote filteringboolean—false
defaultFirstOptionSelect the first match on Enterboolean—false
allowCreateAllow new options; requires filterableboolean—false
automaticDropdownOpen non-filterable select on focusboolean—false
nameNative input namestring—undefined
echoValueTopMove selected rows to top in virtual listboolean—true
extraPropsExtra props passed to custom option componentRecord<string, unknown>—undefined
headeClassCompatibility field; currently has no effectstring—undefined
beforeVisibleChangePost-visibility hook; return break to skip subsequent internal handling(visible: boolean) => void | "break" | "discard-cache" | Promise<void | "break" | "discard-cache">—undefined
placementDropdown placementSelectProps["placement"]—undefined

Events ​

EventDescriptionArguments
update:modelValueSelection changed; update v-model(value: SelectModelValue)
update:valueSelection changed; compatibility event(value: SelectModelValue)
inputSelection changed; compatibility event(value: SelectModelValue)
changeFires when selection changes(value: SelectModelValue)
focusInput gains focus(event: FocusEvent)
blurInput loses focus(event: FocusEvent)
clearClear control activated()
remove-tagTag removed in multiple mode(value: SelectValue)
visible-changeDropdown shown: true; hidden: false(visible: boolean)
select-itemOption clicked; returns its value(value: SelectValue)
scrollList scroll; Event only, without the old range argument(event: Event)
totopList reaches top threshold(event?: Event)
tobottomList reaches bottom threshold(event?: Event)
resizedList viewport measurement(id: string | number, size: number)

Slots ​

SlotDescriptionScope
defaultBelow regular/inline list; use footer for virtual dropdown—
optionCustom option content{ row: SelectOption, item: SelectOption, index: number }
headerList header—
footerList footer—
prefixInput prefix—
emptyEmpty option list content—
loadingCustom loading state—
tagCustom selected tagsElement Plus tag slot props

Exposed methods and state ​

  • currentVal
  • nfVirtualSelect
  • virtualSelectList
  • keyword
  • selectArr
  • optionsList
  • config
  • init()
  • filterMethod(query)
  • highLightFilterMethod(query)
  • visibleChange(boolean)
  • reset()
  • scrollToBottom()
  • scrollToIndex(index)
  • scrollToOffset(offset)
  • getSize()
  • getClientSize()
  • getScrollSize()
  • updatePageModeFront()
  • toggleCheckAll(boolean)
  • focus()
  • blur()

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.

virtualList uses fixed-height vertical SelectV2 rows. Legacy horizontal / pageMode behavior is not supported. Root/wrap/item customization applies to the inline list only; use the exposed methods instead of private Element UI refs.