You found a bug! We've classified it as EXTJS-7367 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Ext JS Premium Member
    Join Date
    Nov 2011
    Posts
    15
    Vote Rating
    0
    arun_v is on a distinguished road

      0  

    Default Toolbar setVisible logic broken with enableOverflow is true

    Toolbar setVisible logic broken with enableOverflow is true


    REQUIRED INFORMATION
    Ext version tested:
    • Ext 4.1.1
    Browser versions tested against:
    • Chrome 23.0.1271.6 dev-m
    Description:
    • When enableOverflow is set to true in a toolbar, the setVisible method doesn't actually toggle the visibility of any items that are in the toolbar
    Steps to reproduce the problem:
    • Make a toolbar with enableOverflow true
    • put in enough items that the overflow menu appears
    • try to use setVisible(false) on a child item that is now in the menu
    The result that was expected:
    • Item should be invisible
    The result that occurs instead:
    • Item is still visible
    Test Case:

    Code:
    var button1 = new Ext.button.Button({
    text: 'Button1'
    });
    var button2 = new Ext.button.Button({
    text: 'Button2'
    });
    var button3 = new Ext.button.Button({
    text: 'Button3'
    });
    var button4 = new Ext.button.Button({
    text: 'Button4'
    });
    var button5 = new Ext.button.Button({
    text: 'Button5'
    });
    var button6 = new Ext.button.Button({
    text: 'Button6'
    });
    
    new Ext.button.Button({
    text: 'Make 4,5,6 invisible',
    renderTo: document.body,
    handler: function() {
    button4.setVisible(false);
    button5.setVisible(false);
    button6.setVisible(false);
    }
    });
    
    new Ext.button.Button({
    text: 'Make 4,5,6 visible',
    renderTo: document.body,
    handler: function() {
    button4.setVisible(true);
    button5.setVisible(true);
    button6.setVisible(true);
    }
    });
    
    new Ext.toolbar.Toolbar({
    renderTo: document.body,
    width   : 200,
    enableOverflow: true,
    items: [button1, button2, button3, button4, button5, button6]
    });
    

    HELPFUL INFORMATION
    See this URL for live test case:Possible fix:
    • not provided
    Operating System:
    • Windows 7 version 6.1(Build 7601: Service Pack 1)
    Earlier report of same bug in Ext 3.x:
    Last edited by arun_v; 26 Sep 2012 at 12:47 PM. Reason: made toolbar width smaller (from 800 to 200) so that menu will appear

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,541
    Vote Rating
    872
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    So you are saying that the setVisible should toggle the menu items in the overflow menu correct?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member
    Join Date
    Nov 2011
    Posts
    15
    Vote Rating
    0
    arun_v is on a distinguished road

      0  

    Default


    Correct. It seems like it should follow like that since the overflow menu is enabled with just a boolean in the toolbar config.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,541
    Vote Rating
    872
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  5. #5
    Sencha Premium Member
    Join Date
    Dec 2011
    Posts
    236
    Vote Rating
    3
    ypandey is on a distinguished road

      0  

    Default


    Hi,

    Could you please let me know whether there is any fix for this. I am currently using ExtJS 4.1.2. I require this in my project where we are hiding few items (combobox) when I have overflow button.

    If there is any quick fix available please share so that I can implement that in code by overriding methods. Else I need to change my design.

    Thanks

Thread Participants: 2