# ember-searchable-collection

> Simple search component with minimal UI

Latest version **0.4.1** (published 2016-09-06) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ember-searchable-collection
pnpm add ember-searchable-collection
yarn add ember-searchable-collection
bun add ember-searchable-collection
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2016-09-06 |
| First published | 2016-05-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Garrett Murphey |
| Maintainers | gmurphey |
| Keywords | ember-addon |

## Links

- npm: https://www.npmjs.com/package/ember-searchable-collection
- Repository: https://github.com/gmurphey/ember-searchable-collection
- Homepage: https://github.com/gmurphey/ember-searchable-collection#readme
- Issues: https://github.com/gmurphey/ember-searchable-collection/issues
- npm.io page: https://npm.io/package/ember-searchable-collection

## Dependencies (2)

- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^5.1.6
- [ember-cli-htmlbars](https://npm.io/package/ember-cli-htmlbars.md) ^1.0.5

## Recent versions

- 0.4.1 (latest) — 2016-09-06
- 0.4.0 — 2016-06-04
- 0.3.0 — 2016-05-18
- 0.2.1 — 2016-05-17
- 0.2.0 — 2016-05-17
- 0.1.0 — 2016-05-16

## README

# ember-searchable-collection

[![Build Status](https://travis-ci.org/gmurphey/ember-searchable-collection.svg?branch=master)](https://travis-ci.org/gmurphey/ember-searchable-collection)

The `searchable-collection` component offers simple search functionality with a minimal, flexible UI.

**NOTE**: the `searchable-collection` component uses contextual components, and requires Ember 2.3 or higher.

```hbs
{{#searchable-collection (array "apples" "oranges" "bananas") as |search|}}
  <p>
    {{!-- search input --}}
    {{search.field}}
  </p>

  <p>
  {{#each search.results as |fruit|}}
    {{fruit}}<br>
  {{/each}}
  </p>
{{/searchable-collection}}
```

For more complex collection members, we're able to define which properties are queryable using the `searchableProperties` property:

```hbs
{{#searchable-collection
  (array
    (hash
      name="apples"
      opinion="good"
    )
    (hash
      name="oranges"
      opinion="awesome"
    )
    (hash
      name="bananas"
      opinion="meh"
    )
  )
  searchableProperties=(array "name" "opinion")
as |search|}}
  {{search.field}}

  {{#each search.results as |fruit|}}
    {{fruit.name}} ({{fruit.opinion}})
  {{/each}}
{{/searchable-collection}}
```

## Installation

* `git clone` this repository
* `npm install`
* `bower install`

## Running

* `ember server`
* Visit your app at http://localhost:4200.

## Running Tests

* `npm test` (Runs `ember try:testall` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`

## Building

* `ember build`

For more information on using ember-cli, visit [http://ember-cli.com/](http://ember-cli.com/).

---
_Source: https://npm.io/package/ember-searchable-collection · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
