-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix victory-native/victory-zoom-container clipping bug (#3026)
Issue summary: Previously, victory-native/victory-zoom-container spread the result of `useVictoryZoomContainer` into `VictoryContainer` ```ts const props = useVictoryZoomContainer(...) return <VictoryContainer {...props} />; ``` Where the return type of `useVictoryZoomContainer` is ``` { props: VictoryZoomContainerMutatedProps; children: React.ReactElement[]; } ``` Because `VictoryContainer` received the entire `props` object as a prop, instead of spreading its properties, values such as `width` and `height` were `undefined` - leading to the viewbox for the svg element to render as `<svg viewBox="0 0 undefined undefined" ...>` thus clipping the rendered chart. Solution: Destructure the props/children result from `useVictoryContainer` and pass correctly to `VictoryContainer`
- Loading branch information
Showing
6 changed files
with
312 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"victory-native": patch | ||
--- | ||
|
||
Fixes clipping/loss of interactivity bug in victory-zoom-container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.