2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00
Commit Graph

58 Commits

Author SHA1 Message Date
Jeff Sagal fc997c195e feat: add vue-demi support 2024-03-21 13:13:21 -07:00
Jeff Sagal 98c278b2bb build(vite): replace webpack with Vite, add Typescript (#1594)
BREAKING: mixins are no longer exported from the index (and will likely be converted to hooks)
2022-07-18 09:33:46 -07:00
Jeff Sagal ff2806876d feat: merge upstream into beta channel (#1589) 2022-02-18 13:55:34 -08:00
Jeff Sagal 06177a4d24 feat: Vue 3 Support (#1344)
BREAKING CHANGE: drop vue 2 support
2021-10-19 18:53:22 -07:00
The Jared Wilcurt bf8be2ec26 feat: move uid to props (#1362)
* Add uniqueKey prop

* move uid to prop

* Update props.md

Co-authored-by: TheJaredWilcurt <4629794+TheJaredWilcurt@users.noreply.github.com>
Co-authored-by: Jeff Sagal <sagalbot@gmail.com>
2021-10-17 10:04:51 -07:00
andreas 68da1c172e feat: add deselectFromDropdown boolean prop (#1033) 2021-10-17 09:47:06 -07:00
Jeff Sagal da0bcb0929 chore(deps): update vue test utils (#1512) 2021-10-06 09:38:50 -07:00
HckrNews 58905e1659 fix: use click instead of mousedown event, fixes iOS bug (#1248)
Thanks to @PieterWigboldus for originally reporting in #814 and fixing in #815.

Co-authored-by: Jeff Sagal <sagalbot@gmail.com>
2021-08-23 13:50:06 -07:00
Jeff Sagal dd281aa8c6 refactor: apply eslint fixes (#1469) 2021-08-01 12:30:50 -07:00
Jeff Sagal 1676947319 feat: add dropdownShouldOpen prop (#1464) 2021-07-22 13:51:43 -07:00
Tiago Roldão 6e1c0dbcbd feat: option selection events (#1324)
- `option:selecting` before state is set
- `option:selected` after state is set
- `option:deselecting` before state is set
- `option:deselected` after state is set

Co-authored-by: tiagoroldao <troldao@assurehedge.com>
Co-authored-by: Jeff <sagalbot@gmail.com>
2020-12-18 12:18:34 -08:00
schelmo a21c973e53 fix(reduce): do not set $data._value in updateValue if reduce option is set
Closes #1210
2020-06-25 10:22:29 -07:00
Doug Kurucz e931f23ce6 fix: allow mouse events in the search input (#1092)
Co-authored-by: Doug Kurucz <doug.kurucz@twosixlabs.com>
Co-authored-by: Jeff <sagalbot@gmail.com>
2020-04-29 12:31:20 -07:00
Jeff Sagal 2eb39087fd feat: add autoscroll boolean prop (#1160)
* feat: add autoscroll boolean prop

Fixes #449

* refactor: update autoscroll implementation

Closes #1028
Closes #910

* refactor: only call maybeAdjustScroll in the watcher

* docs: upgrade vuepress
2020-04-12 15:44:52 -07:00
Jeff Sagal f0e669c022 fix: create option not being called (#1158)
Closes #1156
2020-04-12 12:36:19 -07:00
Jeff Sagal 11306321a2 fix: add aria-activedescendant only when there is one (#1137) 2020-03-26 16:51:53 -07:00
Jeff Sagal f90a14470b fix: existing options should be selected with taggable (#1124)
Closes #1121
2020-03-20 09:31:59 -07:00
Jeff Sagal ca4f3c4017 test: move backspace test (#1109) 2020-03-15 19:31:45 -07:00
andreas eedda74d43 fix: emit input event only if there is val to be deleted (#1038) 2020-03-15 19:17:25 -07:00
Jeff Sagal 518e1919f8 fix(reduce): reduce + taggable bug (#1091)
Resolves #1089
Resolves #993
2020-03-10 21:10:58 -07:00
Jeff Sagal b2f388bc89 feat: header, footer, list-header, list-footer slots (#1085) 2020-03-09 21:56:37 -07:00
Jeff Sagal bc9553a82e fix: Compare Options with getOptionKey instead of label + reduce (#1012) 2020-03-08 17:58:06 -07:00
Jérémie BORDIER fe51fec6b8 feat: calculated positioning (#1049)
Adds `appendToBody` and `calculatePosition` props.

https://vue-select.org/guide/positioning.html

Co-authored-by: Jeff <sagalbot@gmail.com>
2020-03-08 13:31:08 -07:00
Jeff Sagal be44b29ce2 feat: scope the no-options slot (#1083)
Resolves #1071, Resolves #1081

https://vue-select.org/guide/slots.html#improving-the-default-no-options-text
2020-03-05 08:35:38 -08:00
Jeff Sagal bc0d6d219d fix: Add and update WAI-ARIA 1.1 combobox propeties (#1068)
* Add aria 1.1 combobox properties

* Update dropdown test to account for v-show changes

* test: fix dropdown tests

* test: fix pointer scroll warnings

* refactor: implement uniqueId function

* fix: close #1072

remove empty button

Co-authored-by: Jeff Sagal <sagalbot@gmail.com>
2020-03-04 20:08:18 -08:00
Jeff Sagal 207c6d1cb6 feat(clearsearchonblur): add clearSearchOnBlur prop (#1077)
Add docs, update tests from #1060.
2020-03-01 16:31:21 -08:00
Jeff Sagal add1a5282b chore: yarn upgrade (#1062)
* chore: yarn upgrade

* upgrade vue test utils

* fix selectable suite

* fix slot suite

* fix ajax suite

* fix reactive options suite

* fix typeahead suite

* fix reduce tests

* fix tagging suite

* fix deselecting

* fix deselecting

* fix deselecting
2020-02-29 08:30:32 -08:00
Bruno Dias ea8fdbf237 Allow user to control the behavior of clearSearchOnBlur. (#1060) 2020-02-23 12:44:47 -08:00
Jeff Sagal 20a9900118 feat(resetonoptionschange): update resetonoptionschange to accept boolean or function (#1015)
* feat(resetonoptionschange): update resetonoptionschange to accept boolean or function

Workaround #1014

* feat: maybe dont commit a debugger statement
2019-12-02 13:04:00 -08:00
Jeff Sagal 1d024d6ad1 refactor toggleDropdown click handler (#992) 2019-11-14 11:05:05 -08:00
Jeff cde2316e4f pull $emit out of create-option function 2019-11-09 14:19:19 -08:00
Jeff Sagal 92658a31ad Merge pull request #971 from sagalbot/fix-956-event-delegation
WIP Event delegation for #956
2019-11-08 10:51:22 -08:00
Jeff 8cce5e0ea2 add support for composing #900 2019-11-07 15:45:12 -08:00
Jeff 2ca2f3094b add selectOnKeyCodes prop, add tests 2019-11-07 14:08:37 -08:00
Jeff 610193afdf fix selectable tests 2019-10-26 13:23:43 -07:00
Jeff 8d9905c3dc whoops 2019-10-25 18:48:46 -07:00
Jeff 7c66f75579 WIP potential spec for #956 2019-10-25 13:59:23 -07:00
Toby Zerner ceb42b4950 Change all keyup events to keydown (#935)
For a few reasons:

- event.preventDefault() for the Enter key (to stop it from submitting
  the form when you select an item) is only effective if it's a keydown
  event.

- Using keydown for up/down navigation means you can hold them down to
  rapidly scroll through a lot of items.

- Keydown events make the UX feel more responsive, and is consistent
  with how most apps/operating systems handle key presses.
2019-10-25 13:12:59 -07:00
Markus aea81a6f5c Allow to disable options with selectable function (#921)
* allow to disable options with selectable function

* add simple spec for new selectable option

* Prevent non-selectable options from being keyboard navigatable
2019-10-25 13:11:50 -07:00
Jeff Sagal dff8f750a7 Reduce null values (#940)
* support falsey values with reduce

* support null values with reduce
2019-09-14 13:53:16 -07:00
Jeff Sagal 305801e37f support falsey values with reduce (#939) 2019-09-13 15:28:33 -07:00
Jeff 79577b4bae fix typo 2019-09-13 13:13:37 -07:00
Jeff Sagal 1586dbb908 add tests (#938) 2019-09-13 12:53:13 -07:00
Markus ebcdcc5c62 Make sure selected value is an option after option changed and react to value property changes even if tracking value internally (#914)
* make sure selected tracked value is an option if possible

Before this case did not work correctly:

- Select was rendered with *no* options, but *with* a saved value
- Options were fetched by ajax and options prop was updated
- Reduce function if passed

What happens without this commit is that the selected tracked value
simply was the raw reduced value (previously saved). Which means that
displaying a label for example does not work if the label comes from the
unreduced option.

This commit makes sure that the internal tracked value is checked
against all options not only once the select is created but additionally
when options change.

* remove useless keys

- first key was always undefined
- second key was always the index which is not usefull at all since it
  changes based on the order

* add test for setting value after option changed

* correctly react to value property changes if tracking internally

fixes sagalbot#855, sagalbot#842

* add getOptionKey prop

* yarn upgrade doc

* add getOptionKey api doc and fix links

* yarn upgrade

* do not use key on slot

* fix label spec
2019-09-13 12:18:04 -07:00
Jeff Sagal eb2f8f835c - bind scope to open-indicator-icon slot (#860)
- explicitly set v-if on OpenIndicator
- only add searching and searchable state classes if noDrop is false
- only add OpenIndicator to toggleTargets if the $ref exists
2019-04-28 16:09:48 -07:00
Jeff Sagal efc5093207 Add API for overwriting default components (#850)
* implement API for overwriting child components

* add test coverage

* update documentation for Components & Styling

* update docs

* refactor API, update docs

* remove the service worker

* fix tests
2019-04-25 15:03:43 -07:00
Jeff Sagal 01ecee93d5 WIP: v3 – remove onSearch callback prop (#811)
* remove onSearch callback prop

* update ajax docs

* docs formatting

* remove onSearch callback prop
2019-04-08 11:58:04 -07:00
Jeff Sagal 699d595f9a WIP: V3 - Remove index prop, add reduce prop (#800)
* remove `index` in favour of `reduce`, tests passing

* refactor findOptionFromReducedValue

* - always use getOptionLabel in comparisons

* - refactor deselect method
- add missing jsdoc blocks
- organize methods

* bump documentation
2019-03-24 19:23:30 -07:00
Jeff Sagal e4d4b27540 V3/update list items slot (#799)
* add tests for slots, add normalized function for passing options to slots

* update active class

* update active class
2019-03-23 15:58:50 -07:00
Owen Conti f9725919a4 V3 - Remove mutable class properties plus other misc changes (#781)
* Remove the mutableValue prop in the Select component.

* Add back mutable value when Vue Select has to manage its own value.

* Remove mutableOptions, valueAsAarray. Update webpack minifer to use Terser.

* Fix tabbing

* Fix bug with showClearButton

* Fix tests.

* Call clearSelection when possible

* Update dev sandbox to have all three options for setting value.

* Update dev sandbox to display current value

* Remove unused karma test setup.

* Revert onInput name change.

* Use coveralls

* Change this.internalValue to this.$data._value.

* Remove onInput prop and replace with internal method, updateValue.

* Update tests.

* Rename optionObjectComparator to optionComparator.
2019-03-23 11:25:31 -07:00