Ember implementation for @elastic/search-ui
This addon has @elastic/search-ui as peer dependencies. Install your desired version.
yarn add @elastic/search-ui
Once you've installed it, you can now install the addon itself:
ember install ember-search-ui
Running the example locally, clone the repo,
cd ember-search-ui
,
yarn install
,
cd examples/sandbox
,
ember s
You can basically refer to @elastic/search-ui for the documentation and use the example/sandbox's code to get a grip of what's going on for ember specifics.
import Controller from '@ember/controller';
export default class SomeController extends Controller {
properties = [
{
name: 'Name',
relation: 'contact',
valuePath: 'name',
component: 'table/custom/contact-name',
mayBeSorted: false,
},
{
name: 'Company',
valuePath: 'contact.company',
mayBeSorted: false,
},
{
name: 'City / State',
component: 'table/custom/city-state',
valuePath: 'cityName',
mayBeSorted: false,
},
];
//check @elastic/search-ui for config documentation
config = {
onSearch: () => {
return [
{
cityName: 'Monterrey',
contact: {
company: 'Prysmex'
}
},
{
cityName: 'Madrid',
contact: {
company: 'Prysmex'
}
}
]
}
}
}