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

    QSelect Sticky Header

    Framework
    3
    5
    410
    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.
    • E
      edwillys last edited by

      Hello,

      I’m trying to use the QSelect in a way that the first element of the popup list is always shown at the top, even when the user scrolls down. Technically speaking, I want the content defined inside my <template v-slot:before-options > to have a similar behavior of QPageSticky or a sticky header in a QTable. Setting style=“position: sticky;” doesn’t seem to do the trick.

      Is there a way to achieve this?

      Thanks in advance.

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @edwillys last edited by

        @edwillys

        first element of the popup list is always shown at the top

        What about the rest of the options? Where\how are they to be displayed?

        How about this example, this demo displays the dialog on top…? ( second demo)

        https://quasar.dev/vue-components/select#Example--Show-options-in-dialog

        E 1 Reply Last reply Reply Quote 0
        • I
          Ilia last edited by Ilia

          Just tried sticky, works fine:

          https://codepen.io/cobanja/pen/bGwrJGX?editors=1010

          E 1 Reply Last reply Reply Quote 0
          • E
            edwillys @Ilia last edited by

            @Ilia True. I forgot to add the “top” proprety after the position. Thanks for pointing that out!

            1 Reply Last reply Reply Quote 0
            • E
              edwillys @dobbel last edited by

              @dobbel I meant “at the top” instead of “on top”, like a sticky header in a QTable. As pointed out by @Ilia , the position: sticky; top: 0px; does indeed work (I had forgotten to add the top )

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