-
Notifications
You must be signed in to change notification settings - Fork 184
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
Status of dropdownId
arg?
#673
Comments
Hello! I had a hand in writing the modifier. It was a while ago, I think I just opted to use the uniqueId present in the "publicAPI" since that is yielded. Whereas dropdownId isn't really documented (like you found) nor was it clear to me what it is doing. At a glance I think Whereas
If it helps, the uniqueId is yielded as part of the "publicAPI"... though it is just the guid, rather than the full How are you aiming to apply the focus trap? Could you apply it perhaps as a modifier on the content element? The focus-trap modifier below would be able to get the element id that you're after <BasicDropdown as |dd|>
<button {{basic-dropdown-trigger @dropdown=dd}}>trigger</button>
<dd.Content {{focus-trap}}>content </dd.Content>
</BasicDropdown> |
And I've now just realised that this post I replied to is from 2022 😄 ah well, hope my response is helpful regardless |
Yeah, the code I was maintaining is long gone. Thanks for looking into it anyway 😅. Regarding the focus-trap: It was the ember-focus-trap modifier where I believe I was looking for a way to streamline setting its passthrough |
@nwhittaker i agree @Techn1x, its not documented and i think it isn't working anymore like it was on begin... Looking into the history the It looks like many years ago (2016) the uniqueId was introduced instead, which is present in public api... As there is no test... i think we can deprecate it in v8 and we will remove in next major... i will look to prepare this in next time |
The
<BasicDropdown>
component includes a way to override the<BasicDropdownContent>
component'sid
attribute:ember-basic-dropdown/addon/components/basic-dropdown.ts
Line 41 in 3df82cf
But it's undocumented on https://ember-basic-dropdown.com/docs/api-reference. Is it safe to use? If so, it looks like there are some bugs in the
{{basic-dropdown-trigger}}
modifier where the default id is hard-coded:ember-basic-dropdown/addon/modifiers/basic-dropdown-trigger.ts
Lines 68 to 69 in 3df82cf
Specifying (or somehow acquiring) the
id
is useful in cases where focus needs to be trapped in the drop-down.The text was updated successfully, but these errors were encountered: