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

Enhancement: Show Modal Via an Action #38

Closed
jdhines opened this issue Aug 22, 2014 · 3 comments
Closed

Enhancement: Show Modal Via an Action #38

jdhines opened this issue Aug 22, 2014 · 3 comments

Comments

@jdhines
Copy link

jdhines commented Aug 22, 2014

In my app I want to pop up a modal with in-depth details by clicking on a row in a table, so I don't need anything additional (like a button) rendered to initialize the modal. The bootstrap-for-ember component could be pulled up in this way, but the documentation is sparse on how to do it with a ember-component modal if you're not using the em-modal-toggler.

@artburkart
Copy link

I'm not sure how to make a row clickable, but if you can figure out that much, you can stick the open-if attribute into your modal, then give your rows an action that sets a variable to true.

Here's an example JS bin
The website gives documentation on how to reuse a single modal (for your table rows).
It also explains the open-if.

EDIT: Sorry, I put the wrong JS bin in there. It's updated now.

@jdhines
Copy link
Author

jdhines commented Aug 22, 2014

I'll take a look at that, thanks.
The way I have my rows right now is just

<tr {{ action 'openProjectModal' 'project-modal' this on='doubleClick' }}>

@asaf
Copy link
Contributor

asaf commented Dec 16, 2014

As mentioend by @artburkart, open-if makes it easy to open modal by any action.

@asaf asaf closed this as completed Dec 16, 2014
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

3 participants