-
Notifications
You must be signed in to change notification settings - Fork 601
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
add active id to accordion change event #6131
add active id to accordion change event #6131
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this consistent with the way we handle it in other components? I don't recall seeing our code using the id in the event args before.
As @vnbaaij calls out, tabs does this exact thing. The delta here from other components is that activeid is internal to accordion and private, so passing it as part of the event should allow us to expose it gracefully.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably need to port this to the archive branch as well.
"comment": "add activeid to accordion change event", | ||
"packageName": "@microsoft/fast-foundation", | ||
"email": "chhol@microsoft.com", | ||
"dependentChangeType": "patch" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to change this to "prerelease" also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dangit - I missed pushing this...PR incoming
After looking at the source again, I see the accordion-item emits the |
Eh, we could, but I wonder if that's enough in and of itself - that value is already available publicly in the event object I believe. @vnbaaij - you might be able to get the event target in this scenario; I actually think this is a better and more aligned approach considering tabs and the fact that I want the activeid for accordion itself. |
This is related. #6144 to "accordion" reacting to "change" events from items other than "accordion-item" . I have a local branch that adds checks to "accordion" to ensure it only reacts to these events from direct children but I do wonder if we should have more specific event names rather than so many "change" events (ie. "expanded"). |
* add activeid to accordion change event * Change files
Pull Request
π Description
Adds information on the activeid for the accordion as part of the elements custom event.
π« Issues
closes #6130
π©βπ» Reviewer Notes
π Test Plan
β Checklist
General
$ yarn change
Component-specific
β Next Steps