Results 1 to 2 of 2

Thread: Ext.menu.Menu not aligned correctly when opening the first time

  1. #1
    Sencha Premium User
    Join Date
    Apr 2019
    Posts
    10
    Vote Rating
    0
      0  

    Default Ext.menu.Menu not aligned correctly when opening the first time

    Hello everybody,

    I have an issue with a menu, not showing at the proper place for its first appearance.

    the fiddle below shows what I'm using in my code:


    This fiddle works fine. In my app I don't instantiate the menu each time, it is done in the mainPanel controller, then I get the reference back with:

    Code:
    var banneroptionmenu = mainPanel.lookupReference('banneroptionmenu');
    My problem is when I click on the panel for the first time in my app, the menu opens but is not correctly aligned, as you can see on the figure below (1):

    first_opening_bug.png


    After that, it always opens correctly aligned (2).

    I found where it comes from: in my app menu, I bind the menu items texts, like this:

    Code:
    {        bind:{text:'{text.news}'},
            group:'tabItemsGroup',
            checked: false,
            hidden: false,
            index: 1,
            handler: 'onTabItemClick'
    
    
        },
    And I set a
    Code:
    minWidth: 150,
    for the menu.

    So the first time, the menu adjust it's position to the minimum width, and then bind the items texts, some of them larger than 150px. The menu grows in consequence.

    Do you see a solution where I could align correctly the menu, AFTER its values have been bound?

  2. #2
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    469
    Answers
    6
    Vote Rating
    -336
      0  

    Default

    Hello,

    Thank you for contacting Sencha Support!

    I request you to provide a sample app to assist you in a better way.

    Regards,
    Kumar
    Sencha Support.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •