Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added filter method support #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

schrotie
Copy link

@schrotie schrotie commented Mar 6, 2017

Hi there

I added support for generic filter functions. My use-case:

The user can select multiple criteria from a drop-down in the header. Items are kept if they match any of these criteria (OR). This is just what I needed, though. The implementation in iron-data-table is generic and can be used for any complex filter task like combining filters from several columns or whatever.

I tried to touch as little of the existing code as possible, however, I needed to change the way filters are indexed because filter-functions do not have a filterBy property (it's not required and potentially makes the usage of filter functions more difficult for client programmers if it were) which was used as a key for filters. This may change the behavior where client programmers did unhealthy things like using the same filterBy in multiple columns.

I modeled the feature after the "filter" property of Polymer's dom-repeat.

Ugh, and thanks for that great table, love it :-)


This change is Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant