Skip to content

Add env to atom component#45

Open
knownasilya wants to merge 3 commits intobustle:masterfrom
knownasilya:patch-1
Open

Add env to atom component#45
knownasilya wants to merge 3 commits intobustle:masterfrom
knownasilya:patch-1

Conversation

@knownasilya
Copy link

@knownasilya knownasilya commented Apr 6, 2017

This allows the component to control things like env.save(value, payload) to trigger a rerender of the atom or to handle teardown.

@knownasilya
Copy link
Author

Ping

@bantic
Copy link
Contributor

bantic commented Aug 22, 2017

@knownasilya Sorry for the delay. Thanks for submitting. I don't think we had previously considered that the cards or atoms in a mobiledoc would remain "live" after rendered by ember-mobiledoc-dom-renderer. I am pleasantly surprised that this works. :)
Are you wanting to call env.save so that you can update the mobiledoc JSON output? And/or is there a reason that you couldn't modify the Ember component's properties to effect a change in the rendered template? That was more the expectation for this dom renderer.

@palcisto
Copy link

palcisto commented Mar 15, 2018

@knownasilya @bantic Could this PR be modified to also pass the env to the card component? I am in a situation where I am trying to leverage env.isInEditor in my Card component per the mobledoc Card API. Or would it be better to create a new PR to add that functionality?

@knownasilya
Copy link
Author

@bantic it was to save the json of the atom.

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

Successfully merging this pull request may close these issues.

3 participants