Results 1 to 2 of 2

Thread: Updating a TreeStore whose view is hidden

  1. #1
    Sencha Premium Member
    Join Date
    Nov 2012
    Vote Rating

    Default Updating a TreeStore whose view is hidden

    I'm working on an email app using ST 2.2, and recently ran into a fairly nasty bug. The app has a list of folders that starts out hidden, and slides into view on a button tap. If a folder model is changed via a call to set(), that folder disappears from the list.

    Here's how it happens:

    - the call to set() triggers a call to Store::afterEdit()
    - which calls Collection::replace() on the data to replace the old record with the new one
    - the old record is removed
    - the new one is not added because the record gets filtered out by a default filter that checks
    whether the node is visible

    When the list is shown later, the node is gone and there's no check to see if a node that was filtered out
    has now become visible.

    My current workaround is to override applyFilters() with a default filter that returns true. Would it be
    better to do something like sync the store when the list is shown?

  2. #2
    Sencha User's Avatar
    Join Date
    Mar 2007
    DC Area =)
    Vote Rating


    here's an idea i'm just going to throw out there: maybe suspendEvents() on the store when it is hidden, and resumeEvents() when it's shown?

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