v1.0.0
New
- Added
id
prop, which is now passed along all events and can be used to identify which instance emitted the event. - API is now events based:
@update
– called after each change, passes thevalue
andid
@select
– called after selecting an element, passes theselectedOption
andid
@remove
– called after removing an element, passes theremovedOption
andid
@open
– called after opening the dropdown, passes theid
@close
– called after closing the dropdown, passes thevalue
andid
@tag
– called after attempting to create a tag, passes thesearchQuery
andid
@search-change
– called after the search query changes, passes thesearchQuery
andid
- The
deepClone
function is now available as importimport { deepClone } from 'vue-multiselect'
- Added
loading
prop, which shows/hides the spinner - Added
disabled
prop, which disables the component if true - The
selected
prop is no longer required
Breaking Changes
- Two-way binding is deprecated. Please do NOT use
.sync
anymore. Vue-Multiselect will never change anything outside of its own scope. - To propagate changes (updating
selected
value) inside parent component, you always need to listen to@update
event. An example update function could look like this:
onUpdate (newVal) { this.selected = newVal }
- Props with callback functions like:
onChange
,onSearchChange
are now deprecated. Use events instead. touched
prop is deprecated. Use@open
to detect if the component has been touched.
Fixed
- #72 If vue-multiselect is inside a
fieldset
which has thedisabled
attribute, the component will be also partially disabled (pointer-events: none
). IE11+ - #70
- #62
- #60
- #48
Additionally added some tweaks to the code