Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha Premium User
Predefined data collection not observed by store anymore
ExtJS 6.5.3
When using a predefined collection as store data, the collection is not observed by the store and the store is not notified about any updates to the 'store'.
Reason: the call collection.addObserver(store) was moved from constructors of the store (ExtJS 5.1.4) to the constructDatacollection method. But when using a predefined collection, this method and the collection created in this method is not used obviously.
-
It's not a valid thing to pass.
From the docs:
data : Object[] / Ext.data.Model[]
Array of Model instances or data objects to load locally. See "Inline data" above for details.
Defaults to:
undefined
-
Sencha Premium User

Originally Posted by
evant
It's not a valid thing to pass.
I like the Comment in Store#applyData, though:
Code:
// We might be configured with a Collection instance
if (data && data.isCollection) {
But you're right. Dunno where I got that idea from. It would be cool if there was a way to easily define extraKeys for that auto-created collection in the store config/definition then. That's the reason why I did this.
[EDIT] Oh, stores have an extaKeys config, too! MixedIn by LocalStore. Nice to know. It's not documented, but as it's defined as a config property I assume it's safer than my previous undocumented solution.