-
14 Mar 2012 3:22 PM #1
Unanswered: List Deselect on Store Change
Unanswered: List Deselect on Store Change
Hello Everyone,
I have a list which has a selection and I have noticed that when I change the data in the bound store, the data changes, but the original selected object stays. It's as if the list is removing all of the old data except for the selected item. I have checked the mode of the list, and it is in "SINGLE" mode. Is this default behavior or should I do something else such as listen to the store update event and manually deselect my list.
EDIT: Turns out that I am not actually changing the dataset, I am filtering the data set, and the item that remains selected shouldn't be passing the filter, but it is in the store.
Any help is greatly appreciated.Last edited by UbuntuPenguin; 14 Mar 2012 at 3:48 PM. Reason: Clarification on what really is happening
-
14 Mar 2012 5:18 PM #2
The problem laid in the store.removeAll( doItLikeANinjaAndBreakEverything ) function. I had "doItLikeANinjaAndBreakEverything" set to true, so the store didn't fire off its refresh event. Here is the Sencha source
Once I set doItLikeANinjaAndBreakEverything to false it worked.Code:if (silent !== true) { me.fireEvent('refresh', me, me.data); }


Reply With Quote