Skip to content
This repository was archived by the owner on Jan 12, 2020. It is now read-only.

Classes are not concatenated with those in the splattributes on contextual components #7

Closed
cibernox opened this issue Aug 31, 2018 · 2 comments

Comments

@cibernox
Copy link
Contributor

I'm not sure if this is a bug in this addon or in ember itself.

It can be reproduced in this repo: https://github.com/cibernox/sparkles-ember-basic-dropdown

The gist of it:

<BasicDropdown as |dd|>
  <dd.trigger class="custom-class" title="foo">Content</dd.trigger>
</BasicDropdown>
{{!-- basic-dropdown.hbs --}}
{{yield (hash trigger=(component "basic-dropdown-trigger"))}}
{{!-- basic-dropdown-trigger.hbs --}}
<button class="default-class" ...attributes>

The rendered html is:

<button class="default-class" title="foo">

Seems that the splattibutes are applied (the title="foo" is added to the button) but attributes present in the element receiving the splattibutes are not merged.

This however works ok in non-contextual components, like the root <BasicDropdown> for instance.

@rwjblue
Copy link
Owner

rwjblue commented Sep 1, 2018

Ya, almost certainly a bug in Ember itself. Would you mind PR’ing a failing test to Ember? I think you can take this test and make it like this yielded setup. I expect it will fail in the same way...

@cibernox
Copy link
Contributor Author

cibernox commented Sep 6, 2018

This is working with the latest ember release (3.4)

@cibernox cibernox closed this as completed Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants