Skip to content

This app is used to search for records within a table

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

anandfresh/ember-table-search

Repository files navigation

ember-table-search

This app is used to search for records within a table

Compatibility

  • Ember.js v2.18 or above
  • Ember CLI v2.13 or above

Examples

The search helper can filter simple arrays:

// controller.js

export default Ember.Controller.extend({
  fruits: ['Apple', 'Banana', 'Orange']
  query: 'Oran'
});
{{input value=query on-key-press=(action (mut query))}}

<ul>
{{#each (search query fruits) as |fruit|}}
  <li>{{fruit}}</li>
{{/each}}
</ul>

And arrays of objects:

// controller.js

export default Ember.Controller.extend({
  fruits: [
    {
      name: 'Apple',
      opinion: 'Meh'
    },
    {
      name: 'Orange',
      opinion: 'Yay'
    },
    {
      name: 'Banana',
      opinion: 'Nay'
    }
  ],
  searchProperties: ['name', 'opinion'],
  query: 'ay'
});
{{input value=query on-key-press=(action (mut query))}}

<ul>
{{#each (search query fruits properties=searchProperties) as |fruit|}}
  <li>{{fruit.name}}</li>
{{/each}}
</ul>

For more information on using ember-cli, visit https://ember-cli.com/.

About

This app is used to search for records within a table

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published