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

searchField doesn't work #169

Open
mastastealth opened this issue Sep 16, 2016 · 0 comments
Open

searchField doesn't work #169

mastastealth opened this issue Sep 16, 2016 · 0 comments

Comments

@mastastealth
Copy link

I tried a simple version using selectize on Codepen and that works fine, but starting an ember project from scratch and then trying to replicate it doesn't.

The route:

export default Ember.Route.extend({
    model(params) {
        return {
            item: null,
            items: Ember.A([
                {
                    id: 1,
                    category: 'apple',
                    title: 'One' },
                {
                    id: 2,
                    category: 'application',
                    title: 'Two' },
                {
                    id: 3,
                    category: 'beta',
                    title: 'Three' },
                {
                    id: 4,
                    category: 'betap',
                    title: 'Four' }
            ])
        };
    }
});

the template:

{{ember-selectize
    content=model.items
    selection=model.item
    placeholder="Search for apple..."
    optionValuePath="content.id"
    optionLabelPath="content.title"
    searchField=["category","title"]
}}

Typing in a brings up a blank. I can only use the title, why is this?

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

No branches or pull requests

1 participant