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

Feature/force filtering #38

Merged
merged 3 commits into from
Jul 14, 2015
Merged

Feature/force filtering #38

merged 3 commits into from
Jul 14, 2015

Conversation

cmbankester
Copy link
Contributor

Added an observable called forceFilter that tells the datatable to filter the rows even if the current filter is undefined / "". The use case for this is for matching / filtering records on things other than the filter, e.g. on user-selected, pre-defined curricula.

For instance, I have this match function in an application:

class Row {
  ...
  match(filter) {
    return this.matches_component_role_filters() && (
      this.employee_id.toString().indexOf(filter) >= 0 ||
      this.name.indexOf(filter) >= 0
    );
  }
}

In the event that the table is filtered and there is no filter provided from the filter observable, the value passed to the match functions is an empty string.

cmbankester added a commit that referenced this pull request Jul 14, 2015
@cmbankester cmbankester merged commit 2ff3901 into master Jul 14, 2015
@cmckni3 cmckni3 deleted the feature/force-filtering branch January 28, 2016 00:08
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