1. #1
    Sencha Premium Member
    Join Date
    Nov 2012
    Posts
    11
    Vote Rating
    0
    cdamon is on a distinguished road

      0  

    Default Unanswered: Updating a TreeStore whose view is hidden

    Unanswered: 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
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Answers
    102
    Vote Rating
    80
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    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?

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."