-
Notifications
You must be signed in to change notification settings - Fork 14
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
Provide a modifier as an alternative to yielding the trigger component #65
Comments
It's possible <SelectBox ... as |sb|>
<sb.Trigger style="display: contents;">
<MyInputButton class="some-class" @size="lg">{{sb.value}}</MyInputButton>
</sb.Trigger>
<sb.Options> ... </sb.Options>
</SelectBox> |
Thanks... I did consider this, as it would help in our application too. (It would allow us to use our I've tested I'm still considering whether to implement a modifier. I think it would be fairly simple, but I want to experiment with it more before committing to it. |
Initial experimentation seems like it would have the following problem. Given this example: <SelectBox as |sb|>
<input {{sb.input}} />
<sb.Options>
<sb.Option>Foo</sb.Option>
</sb.Options>
</SelectBox> If you provided some attributes to the input, they would not spread nicely. This is because in the modifier would include code like: input.setAttribute('tabindex', tabIndexClosedOverBySelectBox) which would override them, unlike in a component where they can auto merge due to This isn't a deal breaker, its just an observation from initial experimentation |
Hello! I am looking at implementing this addon in my application for some selections in dropdowns.
I think it would be beneficial to this addon to provide the trigger component as a modifier, that way we can use any element as the trigger, and not require the default div element wrapper around the element that we actually want to be the trigger.
I made a few points for this in the ember-basic-dropdown repo when I asked & implemented the same thing a few years ago
cibernox/ember-basic-dropdown#589
TLDR I'd like to see something like this be possible
If this is already do-able somehow, please let me know!
The text was updated successfully, but these errors were encountered: