-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
feat: react-charting legends onchange and defaultSelectedLegends #29799
feat: react-charting legends onchange and defaultSelectedLegends #29799
Conversation
a369c09
to
acca1b1
Compare
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 88312f9:
|
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
📊 Bundle size report🤖 This report was generated against 69fef129d9fba9bab5824281dd5c2f4fac1291ee |
🕵 fluentuiv8 No visual regressions between this PR and main |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: ee8ca9b273641f6fe348338086a7aa29424fbbfb (build) |
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
packages/react-charting/src/components/Legends/Legends.types.ts
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
packages/react-charting/src/components/Legends/Legends.base.tsx
Outdated
Show resolved
Hide resolved
packages/react-charting/src/components/Legends/Legends.base.tsx
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
Thanks for the contribution @NewFuture. This PR is merged now. |
/** | ||
* Callback issued when the selected option changes. | ||
*/ | ||
onChange?: (selectedLegends: string[], event: React.MouseEvent<HTMLButtonElement>, currentLegend?: ILegend) => void; |
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.
Can be renamed to something like onLegendSelectionChange
for better clarity
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.
onChange
is a common naming for input controllers.
add new props into the Legends.
onChange
: Callback issued when the selected option changes.defaultSelectedLegends
: Keys that will be initially used to set selected items.defaultSelectedLegend
: Key for single selection.changes:
Related Issue(s)
#29651