Results 1 to 6 of 6

Thread: setActiveItem: where is getActiveItem?

  1. #1
    Sencha User
    Join Date
    Mar 2016
    Posts
    99
    Answers
    5

    Default setActiveItem: where is getActiveItem?

    there is setActiveItem
    http://docs.sencha.com/extjs/6.0.1/c...-setActiveItem

    but no getActiveItem which were asked for 5 years already https://www.sencha.com/forum/showthr...or-a-tab-panel

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256
    Answers
    759
    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 User
    Join Date
    Mar 2016
    Posts
    99
    Answers
    5

    Default

    What if I pass return value of getActiveTab to setActiveItem - will it work? I just checked and it doesn't work. So it doesn't do it. And everyone should write ugly 2 lines of code instead of just 1 line

    Code:
    var activeTab = tabpanel.getActiveTab();
    var activeTabIndex = tabpanel.items.findIndex('id', activeTab.id);

  4. #4
    Sencha User
    Join Date
    Mar 2016
    Posts
    99
    Answers
    5

    Default

    Maybe no one wants this fix so it doesn't make sense to spend time on it.

    For JetBrains products everyone can open a ticket and vote for a ticket to increase it's popularity and track it's status. I wonder why Sencha is so closed to tracking what users want?

    https://youtrack.jetbrains.com/issue/IDEA-62161

  5. #5
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256
    Answers
    759

    Default

    I just checked and it doesn't work.
    That doesn't sound right. I would suggest you post some sample code, because here's a fiddle below demonstrating that behaviour.

    https://fiddle.sencha.com/#fiddle/1ho1
    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.

  6. #6
    Sencha User
    Join Date
    Mar 2016
    Posts
    99
    Answers
    5

    Default

    Sorry, my bad.
    I had store "bound" to my tabpanel. And when I re-filtered my tabs, I removed them and then added new ones, and selected the one that was previously selected.
    Since getActiveTab() returns object, which is removed when I cleared previous content from tabpanel, it wasn't set correctly. And that code with index worked, because it's just number.

Similar Threads

  1. getActiveItem as a number...
    By GertBoers in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 21 Jun 2012, 12:27 AM
  2. NestedList getActiveItem
    By DMk88 in forum Sencha Touch 1.x: Q&A
    Replies: 2
    Last Post: 9 Nov 2011, 6:13 AM
  3. NestedList - how to get details of getActiveItem() ?
    By gms384 in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 29 May 2011, 2:16 PM
  4. Little Problem using getActiveItem().update
    By Jeud in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 2 Mar 2011, 4:57 AM

Posting Permissions

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