Results 1 to 4 of 4

Thread: Array.filter should check for sparse arrays

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,372

    Default Array.filter should check for sparse arrays

    I'm not sure if this a bug, feature request or a documentation issue.

    The custom Ext.Array.filter code does not check for sparse arrays, but the native implementation includes this check.

    "callback is invoked only for indexes of the array which have assigned values; it is not invoked for indexes which have been deleted or which have never been assigned values."

  2. #2
    Sencha - Forum Administrator
    Join Date
    Sep 2017
    Posts
    1,005

    Default

    Thank you for reporting this. I'll send it over to the support team to look into and we will get it worked out.

  3. #3
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    567

    Default

    I don't think that it is not checking sparse array, When you iterate over it, you can see that it has no elements. ExtJs and JavaScript skips the holes.
    In ExtJs Ext.Array is singleton method where first arguments accept as array and second would be function for logic apply on it.

    Please check this Fiddle : https://fiddle.sencha.com/#view/editor&fiddle/2lgq


    Thanks,
    Kumar

  4. #4
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,372

    Default

    Quote Originally Posted by rakumar View Post
    I don't think that it is not checking sparse array, When you iterate over it, you can see that it has no elements. ExtJs and JavaScript skips the holes.
    In ExtJs Ext.Array is singleton method where first arguments accept as array and second would be function for logic apply on it.

    Please check this Fiddle : https://fiddle.sencha.com/#view/editor&fiddle/2lgq


    Thanks,
    Kumar

    This problem would manifest itself on IE 8.

    Les

Similar Threads

  1. Replies: 5
    Last Post: 9 Apr 2012, 11:58 AM
  2. Check for undefined array using the tpl 'if' operator
    By fwilson in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 5 Jan 2011, 10:31 AM
  3. JSON Store and Array of Arrays
    By discthrower114 in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 24 Aug 2010, 8:24 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
  •