mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
parent
9645f6f4ab
commit
9aa599c18d
3 changed files with 5 additions and 1 deletions
|
@ -54,6 +54,7 @@ exports[`MetricsAxisOptions component should init with the default set of props
|
|||
}
|
||||
vis={
|
||||
Object {
|
||||
"serialize": [MockFunction],
|
||||
"setState": [MockFunction],
|
||||
"type": Object {
|
||||
"schemas": Object {
|
||||
|
@ -126,6 +127,7 @@ exports[`MetricsAxisOptions component should init with the default set of props
|
|||
}
|
||||
vis={
|
||||
Object {
|
||||
"serialize": [MockFunction],
|
||||
"setState": [MockFunction],
|
||||
"type": Object {
|
||||
"schemas": Object {
|
||||
|
@ -169,6 +171,7 @@ exports[`MetricsAxisOptions component should init with the default set of props
|
|||
setCategoryAxis={[Function]}
|
||||
vis={
|
||||
Object {
|
||||
"serialize": [MockFunction],
|
||||
"setState": [MockFunction],
|
||||
"type": Object {
|
||||
"schemas": Object {
|
||||
|
|
|
@ -95,6 +95,7 @@ describe('MetricsAxisOptions component', () => {
|
|||
schemas: { metrics: [{ name: 'metric' }] },
|
||||
},
|
||||
setState: jest.fn(),
|
||||
serialize: jest.fn(),
|
||||
},
|
||||
stateParams: {
|
||||
valueAxes: [axis],
|
||||
|
|
|
@ -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 ? (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue