Comments (5)
@Mobin-khorushi, this is a working example of the SelectInput.vue
<template>
<vue-multiselect
:options="options"
:model-value="modelValue"
@update:model-value="$emit('update:modelValue', $event)"
/>
</template>
<script setup>
import VueMultiselect from 'vue-multiselect'
defineProps(['modelValue'])
defineEmits(['update:modelValue'])
const options = [
'Vue.js',
'React.js',
'Angular.js'
]
</script>
from vue-multiselect.
You have to change this line:
@update:model-value="modelValue"
To this:
@update:model-value="$emit('update:modelValue', $event)"
You need to $emit the update:modelValue
event and the value will be a special event called $event
which will be the select field's value.
Just realised @smirnov-d is already answered your question... Sorry xD
from vue-multiselect.
Are you emitting your value to your parent component? I'm not seeing where that is happening. In all honesty I'm still picking up composition API so please "point out the obvious" if it is.
from vue-multiselect.
thanks alot guys sorry for late reply I actually find out your answers my self after trying a lot but anyway thanks
from vue-multiselect.
does not work
from vue-multiselect.
Related Issues (20)
- TypeError: Cannot read properties of undefined (reading '_c') HOT 4
- Property maxHeight did not change anything HOT 2
- Outer combobox container is not stylable HOT 1
- Vue3, defaults limit & optionsLimit
- Classic select[multiple] view
- singleLabel slot can not read nested property
- Search doesn't work with Vue 3.4.x HOT 2
- How to Fetch when scroll at the bottom ? HOT 2
- Select doesn't working HOT 12
- How to add a cross icon to remove selected option
- format currency for dropdown label
- Vue3 CDN not working HOT 2
- Create event @clean
- Create prop :requiered=true HOT 1
- Vue3 /next: reset-after does not work, no way to clear values. HOT 1
- Vue3 /next unable to deselect group when options are computed property.
- https://vue-multiselect.js.org Docs aren't working HOT 6
- Rationale behind sorting filtered options HOT 2
- i can't access to the documentation website HOT 2
- Need slot for leading icon before label HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-multiselect.