Results 1 to 3 of 3

Thread: combobox in 2nd reopen window not work

  1. #1
    Sencha User
    Join Date
    Jun 2017
    Posts
    2

    Default combobox in 2nd reopen window not work

    Hi,

    combobox in 2nd reopen window not work

    code over here:
    https://fiddle.sencha.com/#view/editor&fiddle/213e

    I have test with extjs 6.x, all are not work.


    when
    1st click showall button, in window click combobox then list data show. then I close with window's x.
    2nd click showall button again and reopen window then click combobox the list data not work..


    any recommend ?


    thanks.

  2. #2
    Sencha Premium User
    Join Date
    Feb 2010
    Location
    Chicago
    Posts
    71
    Answers
    17

    Default

    You have the window set to hide on close and are always creating the window in "showAll". If you are changing the default close action from destroy to hide then you need to check if it already exists before creating it. If it already exists then show it.

    Updated showAll method
    Code:
    function showAll()
    {
        var editWindow = Ext.ComponentQuery.query('#editWindow')[0];
        
        //create the edit window if it doesn't already exist
        //
        if (Ext.isEmpty(editWindow)){
            editWindow = Ext.create('myWindow');
        }
    
    
        editWindow.show();
    }
    Added item identifier to the edit window
    Code:
    Ext.define('myWindow',{
        extend: 'Ext.window.Window',
        itemId : 'editWindow', //added item id to the window for component query
        eduType: 'myWin',
    Fiddle

  3. #3
    Sencha User
    Join Date
    Jun 2017
    Posts
    2

    Default

    It works good. thank you.
    so Extjs 6.x should be check window exist with close: hide parameter ?


    And other thing that if the combobox not in items parameter, just single combobox is works good (field_comboset - Combo Box1).


    https://fiddle.sencha.com/#view/editor&fiddle/213e (I add the single combobox, Combo Box1)


    Click many time showall button to show window and Combo Box1 is always work good.


    This is ExtJS 6.x bug with Combobox in items ?


    Any suggestions ? Still use check window exist ?


    Thank you.

Similar Threads

  1. set checklist in checkbox when window reopen
    By y0uzha in forum Ext: Q&A
    Replies: 10
    Last Post: 1 Feb 2015, 10:44 PM
  2. Window hide and reopen error
    By Kloon in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 15 Aug 2011, 6:01 AM
  3. paging bar is not displaying when i reopen the window
    By Abisha in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 1 Jun 2009, 4:55 AM
  4. when we close an ext window and then reopen it, the window appear empty,
    By nunziofiore in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 2 Apr 2008, 1:23 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
  •