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

291 Commits

Author SHA1 Message Date
Beni Rupp ed58352c2f fix: do not show cursor as pointer when unsearchable select is disabled (#1171) 2020-04-25 08:49:56 -07:00
inoric f47180cdae fix: fix keyboard option navigation skipping all items (#1165)
Fixes #1161. Navigating with up or down arrows would always go to first and last option, skipping
everything in between. Caused by missing break statements, probably deleted by accident.

#1161

Co-authored-by: Dino Pejaković <dino.pejakovic@voxdiversa.hr>
2020-04-17 15:26:30 -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
Hector Romero fea430df27 fix: use width from getBoundingClientRect as the default for calculatePosition (#1114)
* fix: use box-sizing: border-box; on dropdown menu

Co-authored-by: Jeff <sagalbot@gmail.com>
2020-03-19 10:12:32 -07:00
Bruno Dias 4c7e1e0426 fix: don't stop mousedown event on no-option slot (#1117) 2020-03-19 09:10:08 -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 e6d0da6d52 feat: add open & close events (#1101) 2020-03-12 20:46:08 -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
Rafał Gałka f2479434e4 fix: memory leak when positioning with popper (#1094)
* fix: memory leak when positioning with popper
* docs: update calculate position docs

Co-authored-by: Jeff <sagalbot@gmail.com>
2020-03-09 19:08:57 -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
Veli Dönmez 269479315f fix: disable pointer events while during transition 2020-03-01 16:36:01 -08:00
Bruno Dias ea8fdbf237 Allow user to control the behavior of clearSearchOnBlur. (#1060) 2020-02-23 12:44:47 -08:00
Jeff Sagal b7c0d539c4 Fix #1035 (#1061) 2020-02-09 10:24:26 -08:00
Jeff Sagal 3f5872c3fc docs(resetOnOptionsChange): add versioning info (#1020)
* docs(resetOnOptionsChange): update documentation

Related #1015

* docs(resetOnOptionsChange): add versioning info
2019-12-02 13:30:52 -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 619771d0f0 create selectable docs (#996) 2019-11-14 12:18:40 -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 fd218db450 Merge pull request #962 from CK159/master
Fix unclickable dead zones around dropdown and dropdown arrow
2019-11-08 18:11:07 -08:00
Jeff 941f6187b9 Closes #886 2019-11-08 11:23:43 -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 af424159f7 update docs 2019-11-07 17:15:48 -08:00
Jeff 8cce5e0ea2 add support for composing #900 2019-11-07 15:45:12 -08:00
Jeff bc5d0d9e4a remove unused file 2019-11-07 14:10:10 -08:00
Jeff 2ca2f3094b add selectOnKeyCodes prop, add tests 2019-11-07 14:08:37 -08:00
Jeff 877e6a3c85 reset dev env 2019-11-07 12:40:43 -08:00
Markus b8fbefdc2d fix unclosable select dropdown when clicking on dropdown (#949)
The reason for the bug was: clicking on the area blurred the search
input. vue-slect relies on this event to close the dropdown.
Since the click happend inside the dropdown, it did not
close (which is correct). Though now the search input was blurred
already, so clicking outside of the dropdown had no effect. Be
preventing event propagation, the input does not get blurred anymore
when clicking inside the dropdown and everything still works.
2019-10-26 11:42:50 -07:00
Jeff 74917d2a5a refactor, bit cleaner API 2019-10-25 18:07:45 -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
Alex c9c4872f5a Fix unclickable dead zones around dropdown and dropdown arrow 2019-10-07 00:11:23 -04: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
Toby Zerner aecbde8343 Fix dropdown-toggle not being registered correctly as a mousedown target (#934) 2019-09-13 15:31:37 -07:00
Jeff Sagal 305801e37f support falsey values with reduce (#939) 2019-09-13 15:28:33 -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 55ac7ab752 rename open-indicator-icon to open-indicator 2019-05-01 19:34:52 -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 a476e9412f Fix #840 (#841) 2019-04-17 18:07:39 -05:00
Jeff Sagal 90605bd1c5 refactor toggleDropdown for IE11 support (#838) 2019-04-17 10:15:19 -05:00
Jeff 79882ed2ac ensure open-indicator can open the dropdown 2019-04-14 09:35:16 -05:00
Jeff Sagal 5740b88cdc ensure #222 stays closed (#828) 2019-04-13 11:56:41 -07:00