Results 1 to 2 of 2

Thread: Reorder sub panels

  1. #1
    Sencha User
    Join Date
    Apr 2017
    Posts
    11
    Answers
    1

    Default Answered: Reorder sub panels

    I want to reorder panels in an ExtJS 6.6 modern panel.


    In an image archive, I want to have query form where I dynamically add query conditions. Each condition is a separate panel with the specific fields for that condition. They are added (like rows) in a vbox layout. The conditions may be ANDed and ORed, which means the condition order is important. In the form, I'd like to move the conditions up/down.


    My approach to solve this is to remove the condition panel and then insert it at the new position.


    I have a sample fiddle at https://fiddle.sencha.com/#view/editor&fiddle/2opr


    The panel to be moved is removed but never inserted again.

    When I've googled for this, many results comes up but they show solutions for older classic guis (calling the view's doLayout method), I'm using 6.6.0 modern where there is no doLayout method.


    This question has been posted to StackOverflow also but as I haven't received any replies, I post it here to.

  2. I got an answer from Fabio Barros in the Stackoverflow thread https://stackoverflow.com/questions/...94051#54094051

    Just change from this:
    Code:
    var item = this.removeAt(index);
    to this:

    Code:
    var item = Ext.ComponentQuery.query('#' + itemId)[0];
    The fiddle has been updated.

  3. #2
    Sencha User
    Join Date
    Apr 2017
    Posts
    11
    Answers
    1

    Default

    I got an answer from Fabio Barros in the Stackoverflow thread https://stackoverflow.com/questions/...94051#54094051

    Just change from this:
    Code:
    var item = this.removeAt(index);
    to this:

    Code:
    var item = Ext.ComponentQuery.query('#' + itemId)[0];
    The fiddle has been updated.

Similar Threads

  1. Replies: 0
    Last Post: 2 Feb 2011, 3:56 PM
  2. Drag Drop (reorder) Panels within column layout Panel
    By accilies in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 6 Nov 2009, 9:04 AM
  3. How to reorder tab panels using drag-n-drop?
    By mviens in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 2 Dec 2008, 3:36 PM

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
  •