Results 1 to 3 of 3

Thread: Predefined data collection not observed by store anymore

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium User
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    122

    Default 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.

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,253

    Default

    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
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Sencha Premium User
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    122

    Default

    Quote Originally Posted by evant View Post
    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.

Similar Threads

  1. Replies: 1
    Last Post: 23 Jan 2016, 1:16 AM
  2. [OPEN] Importing a Predefined Store Component looses its associated model ...
    By feldtAtDimap in forum Sencha Architect 3.x: Bugs
    Replies: 3
    Last Post: 25 Nov 2014, 10:50 AM
  3. Replies: 11
    Last Post: 29 Apr 2014, 3:16 PM
  4. Replies: 2
    Last Post: 28 Dec 2011, 3:12 AM

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
  •