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

Add confirm and cancel actions to {{yield (hash ...)}} #36

Open
nag5000 opened this issue Nov 10, 2016 · 2 comments
Open

Add confirm and cancel actions to {{yield (hash ...)}} #36

nag5000 opened this issue Nov 10, 2016 · 2 comments

Comments

@nag5000
Copy link

nag5000 commented Nov 10, 2016

It would be useful if I want to close modal window by hands from code-behind, without using {{#modal.cancel}} or forService=true.

Example:

    <div class="ember-remodal inner yielded content" data-test-id="yielded">
      {{yield (hash
        open=(component 'ember-remodal/er-button' modalId=elementId)
        confirm=(component 'ember-remodal/er-button' action=(action 'confirm'))
        cancel=(component 'ember-remodal/er-button' action=(action 'cancel'))
+       confirmAction=(action 'confirm')
+       cancelAction=(action 'cancel')
      )}}
    </div>

  {{#ember-remodal as |modal|}}
    {{my-component done=modal.cancelAction}}
  {{/ember-remodal}}
@sethbrasile
Copy link
Owner

@esbanarango this seems like a solid idea to me, but I haven't had "my head in the game" in a long time, so I don't trust myself. What do you think?

@NagiTs I'm sorry that I didn't see this sooner, I took a non-developer position and haven't been on github for quite a while :/

@sukima
Copy link

sukima commented Apr 2, 2018

@sethbrasile This should be merged! What is the future maintenance plans for this addon?

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