Git Product home page Git Product logo

Comments (8)

adamberecz avatar adamberecz commented on July 22, 2024 1

But can you actually see Multiselect's modelValue prop being set? I don't think so because attribute inheritance works with non-prop attributes and :modelValue is a prop. So adding :modelValue="modelValue" to multiselect should solve the problem.

Btw generally if you have resolveOnLoad set to true and the resulting async option list contains an item which value equals to the initially set modelValue it will be selected once the async process finishes.

from multiselect.

adamberecz avatar adamberecz commented on July 22, 2024

I don't see v-model or :modelValue assigned here.

from multiselect.

Imperio8 avatar Imperio8 commented on July 22, 2024

All the attributes passed to the <restaurant-autocomplete v-model="filters.restaurantId" /> get passed to the root element of the child component automatically.

from multiselect.

Imperio8 avatar Imperio8 commented on July 22, 2024

I don't see v-model or :modelValue assigned here.

https://v3.vuejs.org/guide/component-attrs.html#attribute-inheritance

from multiselect.

Imperio8 avatar Imperio8 commented on July 22, 2024

But can you actually see Multiselect's modelValue prop being set? I don't think so because attribute inheritance works with non-prop attributes and :modelValue is a prop. So adding :modelValue="modelValue" to multiselect should solve the problem.

I tried that. Still doesn't work.

from multiselect.

Imperio8 avatar Imperio8 commented on July 22, 2024

Btw generally if you have resolveOnLoad set to true and the resulting async option list contains an item which value equals to the initially set modelValue it will be selected once the async process finishes.

The options list get's indeed resolved and I get a list with only one item (my item), it's just not selected.

Btw, myabe this will help you to better understand my usecase. I am getting "this.filters.restaurantId" from this.$route.query, on mounted().

from multiselect.

Imperio8 avatar Imperio8 commented on July 22, 2024

The error was mine on the binding from the query params. I apologise for wasting your time and thank you for your work.

from multiselect.

tljafar avatar tljafar commented on July 22, 2024

I used :model-value="default_value" that's worked for me in Vue 3

But can you actually see Multiselect's modelValue prop being set? I don't think so because attribute inheritance works with non-prop attributes and :modelValue is a prop. So adding :modelValue="modelValue" to multiselect should solve the problem.

Btw generally if you have resolveOnLoad set to true and the resulting async option list contains an item which value equals to the initially set modelValue it will be selected once the async process finishes.

from multiselect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.