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

    Q-select mark disabled option with text-decoration: line-through

    Framework
    2
    3
    294
    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.
    • donsherman
      donsherman last edited by

      It’s easy to disable an option but how can I put then a css class like text-decoration: line-through ?

      Q-select has an options-selected-class property but imo it should have also an options-disabled-class prop for that purpose?!

      Is there a chance to overwrite the CSS selector in the .vue file?
      And if so, could someone give an example or hint?
      (this below should be the class)

      102107019-8b84fc00-3e31-11eb-88af-dbad4fa4661f.png

      beets 1 Reply Last reply Reply Quote 0
      • beets
        beets @donsherman last edited by beets

        @donsherman If you want to do it via css, try something like:

        .q-item.disabled {
          text-decoration: line-through
        }
        

        But if you need more control, you would use the options slot: https://codepen.io/pianopronto/pen/KKgmaxN

        1 Reply Last reply Reply Quote 0
        • donsherman
          donsherman last edited by

          @beets Thanks! Didn’t thought it was that easy. 😉

          1 Reply Last reply Reply Quote 0
          • First post
            Last post