Results 1 to 2 of 2

Thread: getData of a store returns link to array instead of new array

  1. #1
    Sencha Premium Member
    Join Date
    Mar 2016
    Posts
    13
    Answers
    2

    Question Answered: getData of a store returns link to array instead of new array

    This is my code

    me.store.filter('missionId', i);
    var missionSteps = me.store.getData();
    me.store.clearFilter();

    what I expected is that missionSteps would differ from what I have now (7 elements vs 16 elements)

    what is more interesting

    var missionSteps = Ext.clone(me.store.getData())

    NOT fixing the problem and even Ext.Array.clone NOT fixing it

    Lodash _.clone() on other hand doint what I wanted just fine...

  2. getData() returns the collection instance. Use getRange() to get an array of records.

  3. #2
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258
    Answers
    759

    Default

    getData() returns the collection instance. Use getRange() to get an array of records.

  4. #3
    Sencha User
    Join Date
    Mar 2016
    Posts
    97
    Answers
    5

    Default

    Thanks!
    Also it there a way in profile to see pending topics? Because when that message appeared that was saying "waiting moderator approval" I was unable to read it (and then it was just gone) and was just wandering where my topic went and why I don't see it (that's why I created duplicate topic from other account)

Similar Threads

  1. [DUP] [5.0+] Ext.data.Store.getGroups Returns Object instead of Array
    By cnelissen in forum Ext 5: Bugs
    Replies: 2
    Last Post: 28 Aug 2014, 2:51 PM
  2. Replies: 4
    Last Post: 10 Aug 2014, 2:04 PM
  3. Replies: 3
    Last Post: 22 Mar 2012, 1:16 PM
  4. Store collection returns empty array
    By Padster in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 18 Sep 2008, 9:11 AM
  5. Replies: 2
    Last Post: 4 Feb 2008, 4:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •