Skip to main content

Bug Tracker

Side navigation

#6468 closed feature (wontfix)

Opened April 21, 2010 03:03AM UTC

Closed November 03, 2010 01:47AM UTC

Pass data into custom filters

Reported by: corey.hart Owned by:
Priority: undecided Milestone: 1.5
Component: selector Version: 1.4.2
Keywords: filter Cc:
Blocked by: Blocking:
Description

How about the ability to pass in data into the filter method, which would then in turn gets passed into each filter defined in the selector.

This comes from my recent problems using the ":contains( str )" filter where the 'str' contains a closing brace ')', breaking the selector.

Attachments (0)
Change History (4)

Changed April 21, 2010 03:05AM UTC by corey.hart comment:1

Forgot to mention that the data would be passed in as the second parameter to the filter method, ".filter( selector, data )"

Replying to [ticket:6468 corey.hart]:

How about the ability to pass in data into the filter method, which would then in turn gets passed into each filter defined in the selector. This comes from my recent problems using the ":contains( str )" filter where the 'str' contains a closing brace ')', breaking the selector.

Changed October 19, 2010 01:07AM UTC by snover comment:2

milestone: 1.4.41.5

Retarget all enhancements/features to next major version.

Changed October 19, 2010 05:55AM UTC by snover comment:3

keywords: filterfilter needsreview
priority: → undecided

Bikeshed/feature creep. Marking for review.

Changed November 03, 2010 01:47AM UTC by dmethvin comment:4

keywords: filter needsreviewfilter
resolution: → wontfix
status: newclosed

I took a quick look at this and it isn't that straightforward to add. Data can easily be passed to

.filter(function(){ ... })
using a closure.