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

23 Commits

Author SHA1 Message Date
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
Jeff Sagal dc91310860 Sass & Class Renames (#759)
* - add autoprefixer
- add cssnano
- add postcss-loader
- remove unused packages

* create RTL scss module

* add vs__ prefix to open-indicator, extract to module

* module for dropdown-toggle

* vs__clear module

* vs__dropdown-menu module

* rename `selected-tag` to `vs__selected`

* remove rtl class

* remove dropdown class

* search-input scss module

* move animations to global module

* refactor dropdown list items

* - spinner slot is now scoped with `loading` variable
- move spinner to scss module

* apply vs__search class directly to search input: if you're using the slot, you might not want default styles

* finish global modules

* make RTL a component state

* - update component states to use vs-- prefix
- rename dropdownClasses to stateClasses

* remove unused property

* Closes #760

* fix states

* more state fixes

* rename .close to vs__deselect

* - simplify dev.html
- start on 'sandbox' development

* update build

* - update webpack config
- move Sandbox to VuePress folder

* update external framework version links

* assign grid areas, ensure 100% height outside of docs

* limit specificity

* first pass at assigning variables

* assign 'darkest'

* remove max-height prop

* rename 'component' variables to 'state'

* update badges

* add deprecation notice to docs

* bump travis config

* add coveralls coverage reporter

* bump netlify config

* additional pass pulling up to variables

* start converting to SVG icons

* middle align action icons

* update netlify config

* netlify bump

* fix travis

* fix travis

* try lcov

* netlify attempt

* prune old packages

* bump travis config
2019-02-18 22:01:39 -08:00
Jeff 8a78de61a6 Merge remote-tracking branch 'origin/feature/input-slot' into release/v3.0
# Conflicts:
#	src/components/Select.vue
2019-02-16 12:05:17 -08:00
Jeff 8c00aa4e0e fix failing test 2019-02-10 17:40:02 -08:00
Jeff 88291d0166 fix failing test 2019-02-10 17:37:23 -08:00
Jeff f83d0db077 remove .only 2019-02-10 17:35:30 -08:00
Jeff 5bb92d8963 fix failing test 2019-02-10 17:35:16 -08:00
Jeff b17fce0ad8 test fixes 2019-02-10 16:43:19 -08:00
Jeff e03c642615 add Jest suite from vue-cli-3 branch 2019-02-10 14:38:30 -08:00