Results 1 to 3 of 3

Thread: Menu.getRefItems should check also if Menu is destroyed

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium User vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    811

    Default Menu.getRefItems should check also if Menu is destroyed

    Menu.getRefItems should check also if Menu is destroyed, otherwise when querying for a component within the same parent container, the Menu.getRefItems throws an error.

    Fiddle: https://fiddle.sencha.com/#fiddle/1ii6

    Steps to reproduce:

    1. Click button: "click me first"
    2. Close the menu with the close button.
    3. Click button "after close, click me to query" .
    4. check console.
    Github https://github.com/vadimpopa
    Blogging @ : http://vadimpopa.com
    Twitter: @vadimvpopa

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

    Default

    I think you've posted this before, I don't really think there's a bug here.

    You should call setMenu(null) if you're going to destroy the menu.
    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.

  3. #3
    Sencha Premium User vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    811

    Default

    Quote Originally Posted by evant View Post
    I think you've posted this before, I don't really think there's a bug here.
    Yes, thought that I need to re-prhase and add the steps.

    Quote Originally Posted by evant View Post
    You should call setMenu(null) if you're going to destroy the menu.
    If by default closeAction config is destroy, I think it should be also by default that check in getRefItems, otherwise for each menu (look in image, there are mores menu which you can't see) I need to call setMenu(null) which is not an solution because I have lots of menus and to me seems more logical and more performant to override getRefItems and add that check myself, if is missing in the framework. But again I still think it should be there, once you provide by default some configs then those should work without problems.

    Screen Shot 2016-10-18 at 7.32.03 AM.jpg
    Github https://github.com/vadimpopa
    Blogging @ : http://vadimpopa.com
    Twitter: @vadimvpopa

Similar Threads

  1. Menu.getRefItems should check also if Menu is destroyed
    By vadimv in forum Ext JS 6.x Bugs
    Replies: 6
    Last Post: 14 Oct 2016, 2:13 AM
  2. [OPEN] Menu not destroyed on item selection
    By nikolay.bobrovskiy in forum Ext 5: Bugs
    Replies: 2
    Last Post: 16 Apr 2015, 12:36 PM
  3. Replies: 1
    Last Post: 2 Oct 2013, 4:03 AM
  4. [CLOSED] Menu on close not destroyed
    By traxanos in forum Ext:Bugs
    Replies: 7
    Last Post: 11 Oct 2011, 5:00 AM
  5. Replies: 14
    Last Post: 9 Dec 2009, 9:40 AM

Tags for this Thread

Posting Permissions

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