Releases: sagalbot/vue-select
v3.0.1 - IE11 Patch
v3.0.0
New
input
slot- import
scss
directly to adjust variables
Refined CSS Selectors
All internal CSS selectors use the lowest level of specificity (usually just one class), expect when global component states like vs--searching
are involved. The refined selectors shave ~2.5kb
off the build, and removes a lot of friction when attempting to override component styles.
Ecosystem
- Enabled Netlify deploys for MRs for easier reviews
- Removed CodeClimate, added Coveralls coverage reporter
- VuePress docs https://vueselect.org
- Test suite updated to Jest + vue-test-utils
- Updated build to Webpack 4, thanks to @yamsellem
Breaking Changes
index
prop replaced with reduce
- v2.x provided the
index
{String}
prop to return a single key from a selected object - v3.x removes the
index
prop, replacing it with thereduce
{Function}
prop.
Using a function instead of a string provides a whole lot more flexibility, allowing for things like
deeply nested values, and really cleaned up the code internally.
const options = [{country: 'Canada', code: 'CA'},];
<!-- v2: using index --->
<v-select :options="options" label="country" index="code" />
<!-- v3: using reduce --->
<v-select :options="options" label="country" :reduce="country => country.code" />
View the full documentation for reduce
.
Removed onChange
, onInput
& onSearch
props
onChange
and onInput
props have been removed. Overwriting onChange
in an application was more likely to break vue-select's internals and cause issues. The input
event provides identical functionality and can be swapped out in your application. Additionally, the change
event has been removed. This event was redundant, input
should be used instead.
onSearch
was also removed in favor of the @search
event. Both receive the same parameters.
CSS is now separate from JS and must be included separately
@import vSelect from 'vue-select`;
@import 'vue-select/dist/vue-select.css';
New Class Prefix: vs__
In order to avoid CSS collisions and allow for low specificity overrides of CSS, all classes have been renamed to include the vs__
prefix. The full list of renamed classes are listed below:
original | renamed |
---|---|
.open-indicator |
.vs__open-indicator |
.dropdown-toggle |
.vs__dropdown-toggle |
.dropdown-menu |
.vs__dropdown-menu |
.clear |
.vs__clear |
.selected-tag |
.vs__selected |
.no-options |
.vs__no-options |
.spinner |
.vs__spinner |
.close |
.vs__deselect |
.active |
.vs__active |
Internal State
The changes listed below are unlikely to break your apps unless you've been hooking into vue-select internal values. #781 (thanks @owenconti!) introduced a number of optimizations to the way that the component handles internal state.
value
: thevalue
prop is undefined by default. vue-select no longer maintains an internalmutableValue
state when avalue
prop has been passed. When:value
orv-model
is not used, vue-select will maintain internal state using the_value
property.mutableOptions
has been removed in favor of anoptionList
computed property.
Misc
fade
transition renamed tovs__fade
- Removed
a
element that was serving as the click handler within dropdown options
v2.6.4 - Unsearchable Placeholders
v2.6.3 - Bootstrap 4
v2.6.2 - Bug Fixes
Great to get another contributor driven release out. Thanks to @hrobertson for #787 and #789. Shout out to @bartvosman for #792 that closes a bunch of mobile issues.
Fixes
v2.6.0 - Stability Improvements
v2.5.1
introduced some regressions that have been patched in this release. The release is primarily maintenance with the exception of #730 adding a backwards compatible prop.
Big thanks to all the contributors helping out with bug fixes and improving the component.
- Shout out to @eriknygren for tons of support from new features to code reviews
- Big thanks to @MrStobbart for fixing many of the regressions that were introduced in 2.5.1.
Fixes
- issues where dropdown could not be closed in certain instances
- #664 multiple selects could choose same option multiple times
- #645 fix docs to show
filterBy
instead offilterFunction
- #744 only show scrollbar when necessary
- #723 cannot clear disabled selects
- #703 fix unresponsive selects
- #671 improves
isOptionSelected
- #711 only emit input on actual events
- #702 support Vuex strict mode
New
- #730 add
autocomplete
prop for search input, defaults tooff
Changes
#747 dist files are no longer tracked
- the majority of PRs had compiled
/dist
files in them making merges more difficult and cumbersome, despite contribution guide that states not to - downside is that when installing using
npm install [email protected]/sagalbot/vue-select.git
, you must require the component fileimport vSelect from 'vue-select/src/components/Select.vue'
- note that this file is not transpiled to ES5
Closes
#575 #634 #671 #717 #659 #573 #545 #526 #504 #455 #533 #689 #648 #722 #736 #732 #529
v2.5.1
Flexbox Layout, Custom Filters, v-model Object Handling
Big thanks to @stevenharman, @eriknygren and @SimoTod for their significant contributions to this release!
New
- Switched to Flexbox based layout, significantly improved UI for multiple selects.
Props:
filterBy
- Callback to determine if the provided option should match the current search text.
Used to determine if the option should be displayed.
- Callback to determine if the provided option should match the current search text.
filter
- Callback to filter results when search text is provided. Default implementation loops each option,
and returns the result ofthis.filterBy
.
- Callback to filter results when search text is provided. Default implementation loops each option,
index
- type:
string
- Tells vue-select what key to use when generating option values when each
option
is an object.
- type:
clearable
- type:
boolean
- Can the user clear the selected property?
- type:
selectOnTab
- type:
boolean
- When true, hitting the 'tab' key will select the current select value
- type:
Changes
- clicking selected options from the dropdown no longer deselects the option to mimic native
<select>
behavior font-family
set toinherit
instead ofsans-serif
- clicking a selected tag will open the dropdown