2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00
Files
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
..
2019-05-15 17:59:47 -07:00
2019-04-14 16:48:16 -07:00
2019-02-18 22:01:39 -08:00

Vue Select

Current Release Bundle Size Monthly Downloads Code Coverage Maintainability Score MIT License

Everything you wish the HTML <select> element could do, wrapped up into a lightweight, extensible Vue component.

Vue Select is a feature rich select/dropdown/typeahead component. It provides a default template that fits the 80% use case for a select dropdown. Here it is by default:

If you want to get a quick sense of what vue-select can do, check out the sandbox.

Features

  • Tagging
  • Filtering/Searching
  • Vuex Support
  • AJAX Support
  • SSR Support
  • Select Single/Multiple Options
  • Tested with Bootstrap 3/4, Bulma, Foundation
  • +95% Test Coverage
  • ~20kb Total / ~5kb CSS / ~15kb JS
  • Zero dependencies

Resources