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

Renderers should pass along hookQualifiers #335

Open
TheOtherDude opened this issue Jan 22, 2017 · 4 comments
Open

Renderers should pass along hookQualifiers #335

TheOtherDude opened this issue Jan 22, 2017 · 4 comments
Labels

Comments

@TheOtherDude
Copy link
Contributor

If I have a list of bunsen details, I would like to be able to use hook qualifiers to specify each individual detail.

@sandersky
Copy link
Contributor

Currently bunsen passes the hook property down so I'm not sure what the issue is on this addon. I'm guessing what you want is for the ember-frost-list to pass down the list items index to each instance as part of the hook?

@TheOtherDude
Copy link
Contributor Author

TheOtherDude commented Jan 22, 2017

Yes, I want the index on each element, but as far as I'm aware, hookQualifiers are passed separately from hook.

If I pass hookQualifiers like this:

{{frost-bunsen-detail
  bunsenModel=bunsenModel
  bunsenView=bunsenView
  hook=(concat hook '-bunsenDetail')
  hookQualifiers=hookQualifiers
  value=record
}}

I get the qualifier passed down to the detail, but it doesn't propagate below the first layer:

screen shot 2017-01-22 at 12 36 51 am

@job13er
Copy link
Contributor

job13er commented Jan 22, 2017

The issue is that if the index is not embedded in te hook, and is instead a hook qualifier (as it should be), then the bunsen component doesn't get it because they hookQualifiers property isn't passed down into sub-components. I'm actually thinking it might be nice to change the way we include the bunsen ID to use a qualifier called bunsenId instead of making it an extension of the hook. Then someone would grab the element by using something like

$hook('form-input', {bunsenId: 'foo.bar.baz'})

And as long as we use the extend helper, and index that was already in the qualifiers given to the form (or detail) would still be there too:

$hook('form-input', {bunsenId: 'foo.bar.baz', index: 1})

@TheOtherDude TheOtherDude changed the title Renderers should pass along hook qualifiers Renderers should pass along hookQualifiers Jan 22, 2017
@notmessenger
Copy link
Contributor

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