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

    Complex menu in layout

    Framework
    5
    11
    6556
    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.
    • druppy
      druppy last edited by

      Hi …

      We have been working a little with quasar and the layout, and as I understand it the “navigation” part of the q-layout is really the main menu of the project, and q-layout know how to make change related to platform and screen width, besides maintaining state of the elements related to current route.

      Now, we like to make menus that is a bit more complex (and dynamic, but the is just work). I bootstrap and other we have things like dropdown or menu components. What is the idea in Quasar ? need we nest q-tab or what is the philosophy for complex menu structure ?

      /BL

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by s.molinari

        A guess on my part, but you can (should?) use Vue-router with (sub)tabs.

        As an example, you can see from the play app, how the tabbed navigation (tabs selection) is using <router-view>, which uses router.js to route to the different pages (which aren’t there yet). This is how you’d do subnavigation under tabs, I would suppose.

        What I don’t understand is why the primary tabs don’t use vue-router. Or do they? 😄 Is the inline route definitions to make the navigation easier to understand? Can they also be made dynamic?

        Scott

        druppy 1 Reply Last reply Reply Quote 0
        • druppy
          druppy @s.molinari last edited by

          @s.molinari That makes sense, and in fact we are using the vue-router, to be able to control the menu in both directions, but when it comes to sub menus (dropdownish), I am a little lost as to how to do that.

          I can see that you too end up with some questions, so maybe we just need to be on the same page as Razvan 🙂

          1 Reply Last reply Reply Quote 0
          • V
            Val last edited by

            I use 2 levels of tabs (main navigation, sub navigation). One controls the main router-view, the other controls the nested router-view.
            Both lives in the Navigation slot, so they stay “overlay”. (your layout can have several elements with prop slot="navigation")

            When the user reaches a page deep enough to display the sub-navigation tabs, I dont want 300 px of header+nav (especially on mobile), so I track the scroll Events.
            User scrolls down -> hide sub nav
            User scrolls up -> show sub nav

            I define my sub-navs in router.js (meta property), and my main layout is in charge for dynamically adding the right sub nav to the navigation slot, depending on the current route.

            But if you need a complex menu with dropdown and sub-menus, as far as I know there is no ready-to-use Quasar solution for this.

            I guess Razvan focuses on components usable on both desktop and mobile, wich complex dropdowns are probably not 😅

            1 Reply Last reply Reply Quote 1
            • s.molinari
              s.molinari last edited by

              @Val - that sounds interesting. Is your project public? If yes, care to share a link?

              Scott

              1 Reply Last reply Reply Quote 0
              • V
                Val last edited by

                Unfortunately it’s a private/corporate project but I’ll try to set up an basic example public repo

                1 Reply Last reply Reply Quote 1
                • rstoenescu
                  rstoenescu Admin last edited by

                  Hi all, will add an out of the box solution for tabs with dropdowns soon.

                  1 Reply Last reply Reply Quote 1
                  • rstoenescu
                    rstoenescu Admin last edited by

                    Opened https://github.com/quasarframework/quasar/issues/325

                    druppy 1 Reply Last reply Reply Quote 0
                    • druppy
                      druppy @rstoenescu last edited by

                      @rstoenescu Perfect, nice to know there is a plan for it, and that I did not miss anything in the docs 🙂

                      The problem is that for navigation I guess you need to modes, one for menu mode and one for toolbar layout.

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

                        See my reply @ https://github.com/quasarframework/quasar/issues/325 to see how I accomplished dropdown menu on tabs.

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

                          Really nice you found a solution, sometimes this is the most important part.

                          But we may need to see if we could find a more streamlined solution in the future 🙂

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