0.2.12 • Published 5 years ago

v-super-select v0.2.12

Weekly downloads
78
License
GPL-3.0-or-later
Repository
github
Last release
5 years ago

v-super-select

GNU 3 License

An accessible and customizable select/drop down component that features searching, grouping, and virtual scrolling.

Props

NameDescriptionTypeRequiredDefault
labelThe label of the dropdown field.Stringfalse-
nameThe label of the text input.Stringfalse-
valueFor v-model binding to selected value.Stringfalse-
itemsData items to display in the drop down.Arrayfalse-
placeholderPlaceholder text to display when no value is selected.Stringfalse'Select an Item...'
disabledIf true the control is disabled from user interactionBooleanfalsefalse
loadingIf true the control is disabled from user interaction and a loading spiner is shownBooleanfalsefalse
autocompleteValue for autocomplete of input tag.Stringfalse'nope'
groupNameFieldProperty of the top level item that indicates the name of the group.Stringfalse'groupName'
childrenFieldProperty of the top level item that contains child items of a group.Stringfalse'items'
valueFieldProperty of the item that contains its value.Stringfalse'value'
textFieldProperty of the item that contains its text to display.Stringfalse'text'
iconUrlFieldProperty of the item that contains the icon url.Stringfalse'iconUrl'
iconClassFieldProperty of the item that contains the icon class.Stringfalse'iconClass'
showValueIndicates if the value of each item should be shown on the right side of the item.Booleanfalsetrue
noneFoundTextText to display when no items are found.Stringfalse'No Results Found'
itemHeightHeight in pixels of each individual itemNumberfalse40
inputHeightCss height of the textbox containerStringfalse'52px'
inputWidthCss width of the textbox containerStringfalse'185px'
dropDownMaxHeightCss max height of dropdown. Will default to calculated bottom of textbox to bottom of window.Stringfalse-
debounceTimeAmount of milliseconds to wait after inputs before search is performed.Numberfalse250
searchFieldsAdditional item properties besides textField and valueField to include when searches are performed. Can be comma delimited string or array of strings.String | String[]false[]
spellcheckAllows enabling browser spellcheck on input field.Booleanfalsefalse
mobileHeaderBackgroundColorBackground color for full-style mobile header.Stringfalse'#2e3a30'
mobileHeaderBorderBottomBottom border color styling for full-style mobile header.Stringfalse'linear-gradient(to right, #2e3a30, #ccc)'
nativeMobileIf true, mobile devices will use native select.Booleanfalsefalse

Events

Event NameDescriptionParameters
inputFor v-model bindingThe selected item
change-The selected item
selectedIndexChanged-The selected item index
openedFired when the dropdown is opened-
closedFired when the dropdown is closed-
keyupKeyup event from filter input-
keypressKeypress event from filter input-
keydownKeydown event from filter input-

Slots

NameDescriptionScope Variables
labelUse to format labellabel
itemUse to format your list items however you like. Use item.$html to show bolded search values.item
groupUse to format your group header list items however you like.group
none-foundUse to format your 'none found' item however you like.text
defaultAdd items the old way with option tags, ex: <option value="1">Item 1</option>-

Methods

MethodDescriptionParameters
selectItemUsed to select an item.The item to select
clearSelectionClears the drop down selection.-
hideDropdownUsed to hide the dropdown-
showDropdownUsed to show the dropdown-
0.2.12

5 years ago

0.2.11

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago