Skip to content

Commit

Permalink
fixing multiple metrics (#62929) (#62961)
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar authored Apr 9, 2020
1 parent 9645f6f commit 9aa599c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ describe('MetricsAxisOptions component', () => {
schemas: { metrics: [{ name: 'metric' }] },
},
setState: jest.fn(),
serialize: jest.fn(),
},
stateParams: {
valueAxes: [axis],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ function MetricsAxisOptions(props: ValidationVisOptionsProps<BasicVislibParams>)
}, [stateParams.seriesParams]);

useEffect(() => {
vis.setState({ type: visType } as any);
vis.setState({ ...vis.serialize(), type: visType });
}, [vis, visType]);

return isTabSelected ? (
Expand Down

0 comments on commit 9aa599c

Please sign in to comment.