Results 1 to 2 of 2

Thread: menu.lookupReference('menuItemRef') returns null

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User razvanioan's Avatar
    Join Date
    Feb 2008
    Location
    Romania
    Posts
    135

    Default menu.lookupReference('menuItemRef') returns null

    In a ViewController, on a context menu I try to lookup menuItem by reference.

    Using menu.lookupReference('menuItemRef') returns null.
    Using component query like menu.down('[reference=menuItemRef]') it's working fine....

    Fiddle bellow. Right click on any grid record.

    PS: please do not take into account the double reference warning, that's ok because for other bug reports using the same fiddle I've used the same menu config in top toolbar as well. You can disable it there and the issue will remain.

    ---
    Razvan Ioan ANASTASESCU
    Senior WEB Developer

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default

    This isn't a bug. The "menu" object isn't a reference holder, the view controller is.

    For the toolbar to be able to hold a reference and capture things underneath it, you'd need to specify referenceHolder: true.

    There's more info here: http://docs.sencha.com/extjs/5.0/api...iner.Container
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Posting Permissions

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