-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Accordion: added openItems to AccordionToggleData #28431
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
Conversation
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| InfoButton | mount | 9 | 13 | 5000 | Possible regression |
All results
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 600 | 609 | 5000 | |
| Button | mount | 312 | 295 | 5000 | |
| Field | mount | 1074 | 1022 | 5000 | |
| FluentProvider | mount | 648 | 652 | 5000 | |
| FluentProviderWithTheme | mount | 80 | 87 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 65 | 64 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 73 | 69 | 10 | |
| InfoButton | mount | 9 | 13 | 5000 | Possible regression |
| MakeStyles | mount | 861 | 844 | 50000 | |
| Persona | mount | 1646 | 1612 | 5000 | |
| SpinButton | mount | 1290 | 1317 | 5000 |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 7b0267b:
|
📊 Bundle size reportUnchanged fixtures
|
Asset size changesUnable to find bundle size details for Baseline commit: 325743f Possible causes
Recommendations
|
🕵 fluentuiv9 No visual regressions between this PR and main |
🕵 fluentuiv9 No visual regressions between this PR and main |
| const open = useAccordionContext_unstable(ctx => ctx.openItems.includes(value)); | ||
| const onAccordionHeaderClick = React.useCallback( | ||
| (ev: AccordionToggleEvent) => requestToggle(ev, { value }), | ||
| (ev: AccordionToggleEvent) => requestToggle(ev, { value, openItems: [] }), |
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.
this looks like a hack. instead of this, how about to simply modify requestToggle signature?
|
Closing this in favor of #28665 |

Previous Behavior
There was no property on
AccordionToggleDatawhich provided the consumer with the details of the current open items of the accordion which respect themultipleandcollapsibleprops.New Behavior
openItemsprop has been added toAccordionToggleDataofonTogglewhich respects themultipleandcollapsibleprop and provides the user with the current open items.Related Issue(s)
multipleandcollapsibleprops #27718