Bug Tracker

Modify

Ticket #6468 (closed feature: wontfix)

Opened 3 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

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

comment:1 in reply to: ↑ description Changed 3 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 3 years ago by snover

  • Milestone changed from 1.4.4 to 1.5

Retarget all enhancements/features to next major version.

comment:3 Changed 3 years ago by snover

  • Keywords needsreview added
  • Priority set to undecided

Bikeshed/feature creep. Marking for review.

comment:4 Changed 3 years ago by dmethvin

  • Keywords needsreview removed
  • Status changed from new to closed
  • Resolution set to wontfix

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.