v1.0.0
New
- Added
idprop, 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 thevalueandid@select– called after selecting an element, passes theselectedOptionandid@remove– called after removing an element, passes theremovedOptionandid@open– called after opening the dropdown, passes theid@close– called after closing the dropdown, passes thevalueandid@tag– called after attempting to create a tag, passes thesearchQueryandid@search-change– called after the search query changes, passes thesearchQueryandid
- The
deepClonefunction is now available as importimport { deepClone } from 'vue-multiselect' - Added
loadingprop, which shows/hides the spinner - Added
disabledprop, which disables the component if true - The
selectedprop is no longer required
Breaking Changes
- Two-way binding is deprecated. Please do NOT use
.syncanymore. Vue-Multiselect will never change anything outside of its own scope. - To propagate changes (updating
selectedvalue) inside parent component, you always need to listen to@updateevent. An example update function could look like this:
onUpdate (newVal) { this.selected = newVal }- Props with callback functions like:
onChange,onSearchChangeare now deprecated. Use events instead. touchedprop is deprecated. Use@opento detect if the component has been touched.
Fixed
- #72 If vue-multiselect is inside a
fieldsetwhich has thedisabledattribute, the component will be also partially disabled (pointer-events: none). IE11+ - #70
- #62
- #60
- #48
Additionally added some tweaks to the code