0.6.7 • Published 10 days ago

vue-opti-select-light v0.6.7

Weekly downloads
50
License
MIT
Repository
github
Last release
10 days ago

vue-opti-select-light

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build-bundle

Lints and fixes files

npm run lint

Description

Hight performance dropdown. Tested with 1,000,000 items with lazyRender.

Props

NameDescription
valueKey or Array of keys
selectFirstBoolean default => FALSE
optionsArray of object or Function (Server Side)
uniqueKeyString OR Function(option) => "String", Default "value"
labelKeyString OR Function(option) => "String", Default "content"
searchableBoolean default => FALSE
searchFieldsArray or Function, Default labelKey
searchPlaceholderString default "Search..."
searchNoResultsPlaceholderString default "No results found..."
debounceBoolean default => FALSE (Search debounce)
debounceValueNumber default 250ms
groupsArray of object
groupBoundaryBoolean default => TRUE, Radio button case
groupCollapseBoolean default => FALSE, Activate collapse group
collapsedBoolean default => FALSE, Default collapsed state
buttonTypeString default "placeholder", options => "filter", "static", "tag"
tagLimitNumber default => 50 ( Used when buttonType is "tag" )
buttonNoCaretBoolean default => FALSE
buttonBlockBoolean default => FALSE
buttonSizeString default => "sm"
optionTypeString default "text", options => "radio", "checkbox"
buttonPlaceholderString default "Select Option"
buttonPlaceholderAllSelectedString default ""
buttonPlaceholderMultipleFunction({ count, suffix }) => ${count} item${suffix} selected
singleBoolean default => FALSE
lazyBoolean default => FALSE
lazyRenderBoolean default => FALSE
emitOnClickBoolean default => FALSE
disabledBoolean default => FALSE
preventBoolean default => FALSE (Prevent from selecting)

Slots

NameDescription
BUTTON_PLACEHOLDERslot-scope="{ options, option }"
TAGslot-scope="{ option, remove }"
TAG_LABELslot-scope="{ option }"
HEADER
HEADER_2Slot after search
FOOTER
GROUP_BEFOREslot-scope="{ group }"
GROUPBEFOREnameslot-scope="{ group }"
GROUPslot-scope="{ group, selectAllFiltered, unselectAllFiltered }"
GROUP_nameslot-scope="{ group, selectAllFiltered, unselectAllFiltered }"
GROUP_AFTERslot-scope="{ group }"
GROUPAFTERnameslot-scope="{ group }"
ITEMslot-scope="{ option }"
ITEM_nameslot-scope="{ option }"
ITEMBEFOREnameslot-scope="{ option }"
ITEMAFTERnameslot-scope="{ option }"
SEARCH_NO_RESULTS

Events

NameDescription
@inputFunction(Array)
@updateFunction(Array), Exec when updated from v-model
@clickFunction({Object}, Boolean)
@changeFunction(Array), Exec when hidden
@shownDropdown shown
@hiddenDropdown hidden

Methods

NameDescription
add()Function(String or Array of keys)
remove()Function(String or Array of keys)
selectAll()Select All
clear()UnSelect All
show()Open dropdown
hide()Hide dropdown
resetOptions()Reset Server-Side options

vee-validate 2.*

PropDescription
data-vv-value-path"$c_model" (optional)
data-vv-validate-on"input|update"
// Example vee-validate 2.*
<vue-opti-select-light
  :class="[{ 'has-error': $_hasError('field3') === false }, 'w-100']"
  data-vv-as="Campaign Type"
  v-validate="'required'"
  data-vv-validate-on="input|update"
  data-vv-value-path="$c_model"
  name="field3"
  :value="row.field3 && row.field3.to && row.field3.to.value ? row.field3.to.value.key : null"
  @change="(option) => { row.field3.to = option; $_changeFieldTo(row, item); }"
  :options="$c_fieldsToOptions"
  :groups="optionsData.fieldsGroup"
  :unique-key="option => option.value.key"
  label-key="text"
  single
  searchable
  button-block
/>

Todo!

  • Lazy Render groups support
0.6.7

10 days ago

0.6.6

3 months ago

0.6.5

2 years ago

0.6.4

2 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.14

3 years ago

0.4.13

3 years ago

0.4.12

3 years ago

0.4.10

4 years ago

0.4.11

4 years ago

0.4.9

4 years ago

0.4.8

4 years ago

0.4.7

4 years ago

0.4.6

4 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.14

4 years ago

0.3.13

4 years ago

0.3.12

4 years ago

0.3.11

4 years ago

0.3.10

4 years ago

0.3.9

4 years ago

0.3.8

4 years ago

0.3.6

4 years ago

0.3.7

4 years ago

0.3.0

4 years ago

0.3.5

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.2.0

4 years ago

0.1.8

4 years ago

0.1.9

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago