Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Reordering tabs beyond the add tab button

    In the TabSet component, if I have both setCanReorderTabs(true) and setCanAddTabs(true) I am allowed to reorder the tabs beyond the add tabs button. Furthermore, when moving my tab(s) back from beyond the add tab button, the number of tabs counter is wrong.

    I have the following minimal example:

    Code:
        public void onModuleLoad() {
            final TabSet tabs = new TabSet();
            tabs.setCanReorderTabs(true);
            tabs.setWidth("50%");
            tabs.setCanAddTabs(true);
            Tab t1 = new Tab("tab1");
            Tab t2 = new Tab("tab2");
            tabs.addTab(t1);
            tabs.addTab(t2);
            tabs.draw();
            
            tabs.addTabsReorderedHandler(new TabsReorderedHandler() {
                
                @Override
                public void onTabsReordered(TabsReorderedEvent event) {
                    GWT.log("Number of tabs: " + tabs.getNumTabs());
                }
            });
        }
    Now I am able to move tab 2 to the right of the add tab button and after moving it back again I have produced the following log

    Code:
    Number of tabs: 2
    Number of tabs: 3
    I am currently using the smartgwt found here: https://www.smartclient.com/builds/S...GPL/2016-12-19

    Hope you are able to fix it.
    Last edited by someDeveloper; 19 Dec 2016, 23:57.

    #2
    Hi,

    this issue has been fixed now, you'll find the fix in the builds dated since 22Dec.

    thanks for reporting,
    Isomorphic

    Comment


      #3
      Great! Thanks for the quick work. The reordering problem is now gone.

      I have just found another bug related the addTab button, though:
      When drawing a tabset having an addTab button, but no tabs (yet), I get an error saying "_5.setSelected is not a function".
      The below minimal example will reproduce it for 6.1d SNAPSHOT_v11.1d_2017-01-05/LGPL.

      Code:
          public void onModuleLoad() {
              TabSet tabs = new TabSet();
              tabs.setCanAddTabs(true);
              tabs.draw();
          }
      Last edited by someDeveloper; 5 Jan 2017, 02:16.

      Comment


        #4
        Thanks again for reporting, this new issue has been fixed now, you should be able to test it on next builds, dated Jan 13th.

        Regards,
        Isomorphic

        Comment

        Working...
        X