Results 1 to 4 of 4

Thread: Card Layout - Restore previous card bug

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium User
    Join Date
    Nov 2008
    Posts
    18

    Default Card Layout - Restore previous card bug

    After removing the card from the container, the first card becomes active but remains hidden.


  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449

    Default

    I was able to get the setActiveItem to work but changed up a few things:

    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Oct 2018
    Location
    Noida
    Posts
    54

    Default

    You need to define activeItem: 'card-1' to the container directly rather than its layout. As container is keeping track to its active item. If you are not defining active item to the container, its treating as first item that is 'card-0'. So when you are removing 'card-1' from container, and trying to set 'card-0' as active, at that time container is checking its exiting item, its founding 'card-0', thats why its not doing any processing to show that card.
    So the solution is -
    * Define activeItem: 'card-1' or 1 to the contianer.
    * Also remove that alert part as it will give error becase after removing second card, getActiveItem() will return null.

  4. #4
    Sencha Premium User
    Join Date
    Nov 2008
    Posts
    18

    Default

    mitchellsimoens, praveensaini23 thank you for valuable advice.

Posting Permissions

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