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

Contextual components are not new instances #12537

Closed
amk221 opened this issue Oct 30, 2015 · 3 comments
Closed

Contextual components are not new instances #12537

amk221 opened this issue Oct 30, 2015 · 3 comments
Labels

Comments

@amk221
Copy link

amk221 commented Oct 30, 2015

select-box.hbs

    {{yield (hash option=(component 'select-box-option'))}}

application.hbs

    {{#select-box as |sb|}}
        {{sb.option label='Foo'}}
        {{sb.option}}
        {{sb.option}}
    {{/select-box}

The above renders 'Foo' three times (fiddle)
I expected sb (the select box's public 'api') to render a new instance of each select-box-option

@mmun mmun added the Bug label Oct 30, 2015
@rwjblue
Copy link
Member

rwjblue commented Oct 30, 2015

Definitely seems like a bug.

@Serabe - Do you happen to have any time to figure out what is going on?

@Serabe
Copy link
Member

Serabe commented Oct 30, 2015

I have just landed in Madrid (I'm in the plane still). Let me take a look
this weekend.

On Fri, 30 Oct 2015 22:19 Robert Jackson notifications@github.com wrote:

Definitely seems like a bug.

@Serabe https://github.com/serabe - Do you happen to have any time to
figure out what is going on?


Reply to this email directly or view it on GitHub
#12537 (comment).

@Serabe
Copy link
Member

Serabe commented Oct 31, 2015

I'll submit a fix tomorrow.

Serabe added a commit to Serabe/ember.js that referenced this issue Nov 1, 2015
…ponents

When merging two parameters hashes coming from components/closure components we
want them to be merged into a new hash. This refactors does not only make this
happen but it changes `mergeHash` into `mergeInNewHah` to be explicit about
this.

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

No branches or pull requests

4 participants