Bug Tracker

Opened 9 years ago

Closed 9 years ago

#6468 closed feature (wontfix)

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.

Change History (4)

comment:1 in reply to:  description Changed 9 years ago by corey.hart

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

Replying to 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.

comment:2 Changed 9 years ago by snover

Milestone: 1.4.41.5

Retarget all enhancements/features to next major version.

comment:3 Changed 9 years ago by snover

Keywords: needsreview added
Priority: undecided

Bikeshed/feature creep. Marking for review.

comment:4 Changed 9 years ago by dmethvin

Keywords: needsreview removed
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.

Note: See TracTickets for help on using tickets.