/ember-cli-filter-component

A simple Ember.js component used to filter an array based on user input.

Primary LanguageJavaScriptMIT LicenseMIT

ember-cli-filter-component

Code Climate Ember Observer Score Shields.io Test Coverage Build Status

Table of Contents

About

ember-cli-filter-component provides a {{filter-content}} block component. The component filters an array of items based on specified properties using a text input field. The input field can also be disabled to allow for alternative filter input methods.

Installation

cd /path/to/my-awesome-application
ember install ember-cli-filter-component

Properties

content (req.) {array.<array, object, string>}

  • Items being checked for matches against query

filteredContent {array}

  • Computed result of filtering items from content against query

inputClassNames {string}

  • Class names appended to the filter text input
    • Space-delimited
    • ex: inputClassNames"all-caps monospaced"

placeholder {string}

  • Placeholder for the filter text input
    • ex: placeholder="Type here to filter..."

properties (req.) {string}

  • Properties on each item to filter
    • Space-delimited
    • Enumerables are represented using @each
    • ex: properties="title category.@each"

query {string}

  • Value used to match against items from content
    • Set using the filter text input

showInput {boolean}

  • Whether to show the filter text input

Contributing / Modifying

Clone the project and do what you want with it. If you're feeling generous submit a PR against the feature branch (GitHub).

cd /path/to/projects
git clone git@github.com:zakmac/ember-cli-filter-component.git

For more information on using **ember-cli**, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).
For more information on **Ember.js**, visit [http://www.emberjs.com/](http://www.emberjs.com/).
Looking for more great Ember addons? Check out [http://www.emberobserver.com/](http://www.emberobserver.com/).
Check out the Ember.js IRC channel at `#emberjs` on **Freenode IRC** or join the [Ember Community Slack organization](https://ember-community-slackin.herokuapp.com/).