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

Rendering an ember component #14

Closed
Ramblurr opened this issue Oct 14, 2015 · 11 comments
Closed

Rendering an ember component #14

Ramblurr opened this issue Oct 14, 2015 · 11 comments

Comments

@Ramblurr
Copy link
Contributor

I would like to render a custom component for the "item"s in selectize. Currently using ui-selectize I have to return a string of html to be used to render the item.

Is there anyway to render an ember component here? And of course get the full benefit of a component with actions, etc?

@yankeeinlondon
Copy link
Member

I think that would be ideal. I included the more cumbersome HTML string approach for now because it was easier but at some point I'd like move to this. In the mean time, however, I'd be happy to take a PR if you have the time.

@Ramblurr
Copy link
Contributor Author

@ksnyde Thanks, I'll take a look at it.

A related question, whem you use the existing Renders, the this of the render callback function is selectize. Is there no way to use the render feature but retain access to the this of my Ember controller?

@yankeeinlondon
Copy link
Member

Don't have much time today, but if I remember right there are examples in the codebase of where the callbacks are bound to the this scope of the Ember component.

@yankeeinlondon
Copy link
Member

hi @Ramblurr, any progress?

@Ramblurr
Copy link
Contributor Author

No, basically this is blocked by selectize/selectize.js#617. Selectize has to allow us to return DOM / jquery elements rather than HTML strings.

@yankeeinlondon
Copy link
Member

I see. Do you think using something like wormhole would be able to make this work in the interim?

@yankeeinlondon
Copy link
Member

I think this underlying issue has now been fixed ... if you're still interested.

@yankeeinlondon
Copy link
Member

I've got this working now if you're interested @Ramblurr

@Ramblurr
Copy link
Contributor Author

Thanks @ksnyde! I'll check it out, but we're in the process of migrating away from selectize.js to ember-power-select. It's much leaner than selectize, fully-emberfied, and much better for my sanity to develop against.

@yankeeinlondon
Copy link
Member

Yeah I was just talking with Miguel about power-select and I think it hits all my use-cases too

@Ramblurr
Copy link
Contributor Author

Many thanks for maintaining this project by the way, it was incredibly helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants