No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Dynamic state disable q-select BUT disable options individually

    Framework
    2
    2
    276
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      meenahoda last edited by meenahoda

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • C
        chyde90 last edited by

        Yes. If you write your options array as a computed property, you can do this:

        computed: {
            options() {
                return [
                    { label: 'Google', value: 'GOOGLE' },
                    { label: 'Facebook', value: 'FACEBOOK' },
                    { label: 'Twitter', value: 'TWITTER' },
                    { label: 'Apple', value: 'APPLE', disable: this.selected === 'GOOGLE' },
                    { label: 'Oracle', value: 'ORACLE' }
                ];
            }
        }
        
        1 Reply Last reply Reply Quote 1
        • First post
          Last post