You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a filter on dom-repeat only one parameter is being passed to the filter function when it's called, the current item in the array, this is a bit of a hindrance when performing filtering on arrays since index and the original array are often used in the filtering process and are supplied when dealing with filtering, it is expected that dom-repeat would match the JS spec for array.filter that provides all three.
Description
When using a filter on dom-repeat only one parameter is being passed to the filter function when it's called, the current item in the array, this is a bit of a hindrance when performing filtering on arrays since index and the original array are often used in the filtering process and are supplied when dealing with filtering, it is expected that dom-repeat would match the JS spec for array.filter that provides all three.
Live Demo
https://jsfiddle.net/amurdock/rumt2by9/
Steps to Reproduce
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter
Expected Results
The filter gets called with (element, item, array)
Actual Results
The filter function is getting called with only the element parameter
Browsers Affected
Versions
The text was updated successfully, but these errors were encountered: