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

    Omissions in QTabs component

    Framework
    1
    1
    103
    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.
    • rubs
      rubs last edited by

      The QTabs component is quite useful, but in my opinion it has some omissions:

      • It’s not redrawn automatically when a QTab item is inserted or removed – especially the navigation arrows visibility doesn’t change. I kinda solved this one by using a ready flag that gets updated when a new item is inserted, but it would be easier if the component did it already.
      • When inserted, new tabs that go past the current width are not scrolled into view. Apparently there are not events for doing this.
      • The mouse scroll wheel doesn’t do anything. Capturing the wheel events and sending clicks to the arrows didn’t work for me:
      wheel_scroll: function(event)
      {
        let arrows = this.$el.getElementsByClassName('q-tabs__arrow');
        let evt = document.createEvent("MouseEvents");
        evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
        // Here I chose one arrow for testing, but nothing happened:
        arrows[1].dispatchEvent(evt);
      }
      
      • It would be nice if users were able to drag individual tabs to change their order.

      Would exposing some extra events and properties allow these actions? I don’t know. Any help is appreciated. Thanks!

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