-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
nearestOfType marked private? #12110
Comments
I would much prefer the contextual component/helpers RFC's concepts to allow nested components to have access to their relative parents vs traversing up the tree to find the nearest of a given type. For example, I would prefer something like the following:
Where because it was invoked off of Anyways, that isn't really the point of this issue (or maybe it does show the potential future if we can make it all happen). I am OK with it being marked |
The above is referring somewhat to the ideas of #10244 and emberjs/rfcs#64. |
|
@mmun Indeed, I use it too and it is very helpful. For composable components it is very neat to have it traverse to the parent component by type instead of manualy recursing on |
@steffenbrem I think you'll find that what @rwjblue suggested is even better in almost all cases. |
while it isn't as nice as the contextual components rfc, I've been associating parent and child components by emitting
Ember Sortable uses this approach rather than |
@raycohen - Yep, that is a great solution (if a little more verbose) until this lands. Still: 👍 on marking as public. Would merge. :) |
Closed by #12111. |
In 6e1ad90
nearestOfType
was marked asprivate
.On a quick search I could not find anything internal to ember accessing
nearestOfType
beyond the tests explicitly testing it.nearestOfType
seems to go against the desire for components to be encapsulated. However I have run across a few addons that use it.It seems like it should either be marked as public or become deprecated. What is the future for this method?
The text was updated successfully, but these errors were encountered: