Skip to content

Commit 31a3ec5

Browse files
authored
[Time To Visualize] Make State Transfer App Specific (#89804)
* made state transfer app specific
1 parent a1a2536 commit 31a3ec5

21 files changed

+162
-56
lines changed

docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.cleareditorstate.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,20 @@
44

55
## EmbeddableStateTransfer.clearEditorState() method
66

7+
Clears the [editor state](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) from the sessionStorage for the provided app id
8+
79
<b>Signature:</b>
810

911
```typescript
10-
clearEditorState(): void;
12+
clearEditorState(appId: string): void;
1113
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| appId | <code>string</code> | The app to fetch incomingEditorState for |
20+
1221
<b>Returns:</b>
1322

1423
`void`

docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingeditorstate.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44

55
## EmbeddableStateTransfer.getIncomingEditorState() method
66

7-
Fetches an [originating app](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) argument from the sessionStorage
7+
Fetches an [editor state](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) from the sessionStorage for the provided app id
88

99
<b>Signature:</b>
1010

1111
```typescript
12-
getIncomingEditorState(removeAfterFetch?: boolean): EmbeddableEditorState | undefined;
12+
getIncomingEditorState(appId: string, removeAfterFetch?: boolean): EmbeddableEditorState | undefined;
1313
```
1414

1515
## Parameters
1616

1717
| Parameter | Type | Description |
1818
| --- | --- | --- |
19+
| appId | <code>string</code> | The app to fetch incomingEditorState for |
1920
| removeAfterFetch | <code>boolean</code> | Whether to remove the package state after fetch to prevent duplicates. |
2021

2122
<b>Returns:</b>

docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingembeddablepackage.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44

55
## EmbeddableStateTransfer.getIncomingEmbeddablePackage() method
66

7-
Fetches an [embeddable package](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) argument from the sessionStorage
7+
Fetches an [embeddable package](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) from the sessionStorage for the given AppId
88

99
<b>Signature:</b>
1010

1111
```typescript
12-
getIncomingEmbeddablePackage(removeAfterFetch?: boolean): EmbeddablePackageState | undefined;
12+
getIncomingEmbeddablePackage(appId: string, removeAfterFetch?: boolean): EmbeddablePackageState | undefined;
1313
```
1414

1515
## Parameters
1616

1717
| Parameter | Type | Description |
1818
| --- | --- | --- |
19+
| appId | <code>string</code> | The app to fetch EmbeddablePackageState for |
1920
| removeAfterFetch | <code>boolean</code> | Whether to remove the package state after fetch to prevent duplicates. |
2021

2122
<b>Returns:</b>

docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ export declare class EmbeddableStateTransfer
2929

3030
| Method | Modifiers | Description |
3131
| --- | --- | --- |
32-
| [clearEditorState()](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.cleareditorstate.md) | | |
33-
| [getIncomingEditorState(removeAfterFetch)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingeditorstate.md) | | Fetches an [originating app](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) argument from the sessionStorage |
34-
| [getIncomingEmbeddablePackage(removeAfterFetch)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingembeddablepackage.md) | | Fetches an [embeddable package](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) argument from the sessionStorage |
32+
| [clearEditorState(appId)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.cleareditorstate.md) | | Clears the [editor state](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) from the sessionStorage for the provided app id |
33+
| [getIncomingEditorState(appId, removeAfterFetch)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingeditorstate.md) | | Fetches an [editor state](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) from the sessionStorage for the provided app id |
34+
| [getIncomingEmbeddablePackage(appId, removeAfterFetch)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingembeddablepackage.md) | | Fetches an [embeddable package](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) from the sessionStorage for the given AppId |
3535
| [navigateToEditor(appId, options)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetoeditor.md) | | A wrapper around the method which navigates to the specified appId with [embeddable editor state](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) |
3636
| [navigateToWithEmbeddablePackage(appId, options)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetowithembeddablepackage.md) | | A wrapper around the method which navigates to the specified appId with [embeddable package state](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) |
3737

src/plugins/dashboard/public/application/hooks/use_dashboard_container.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121

2222
import { DashboardStateManager } from '../dashboard_state_manager';
2323
import { getDashboardContainerInput, getSearchSessionIdFromURL } from '../dashboard_app_functions';
24-
import { DashboardContainer, DashboardContainerInput } from '../..';
24+
import { DashboardConstants, DashboardContainer, DashboardContainerInput } from '../..';
2525
import { DashboardAppServices } from '../types';
2626
import { DASHBOARD_CONTAINER_TYPE } from '..';
2727

@@ -68,7 +68,9 @@ export const useDashboardContainer = (
6868
searchSession.restore(searchSessionIdFromURL);
6969
}
7070

71-
const incomingEmbeddable = embeddable.getStateTransfer().getIncomingEmbeddablePackage(true);
71+
const incomingEmbeddable = embeddable
72+
.getStateTransfer()
73+
.getIncomingEmbeddablePackage(DashboardConstants.DASHBOARDS_ID, true);
7274

7375
let canceled = false;
7476
let pendingContainer: DashboardContainer | ErrorEmbeddable | null | undefined;

src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.test.ts

Lines changed: 82 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ describe('embeddable state transfer', () => {
4242
const destinationApp = 'superUltraVisualize';
4343
const originatingApp = 'superUltraTestDashboard';
4444

45+
const testAppId = 'testApp';
46+
47+
const buildKey = (appId: string, key: string) => `${appId}-${key}`;
48+
4549
beforeEach(() => {
4650
currentAppId$ = new Subject();
4751
currentAppId$.next(originatingApp);
@@ -82,7 +86,9 @@ describe('embeddable state transfer', () => {
8286
it('can send an outgoing editor state', async () => {
8387
await stateTransfer.navigateToEditor(destinationApp, { state: { originatingApp } });
8488
expect(store.set).toHaveBeenCalledWith(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, {
85-
[EMBEDDABLE_EDITOR_STATE_KEY]: { originatingApp: 'superUltraTestDashboard' },
89+
[buildKey(destinationApp, EMBEDDABLE_EDITOR_STATE_KEY)]: {
90+
originatingApp: 'superUltraTestDashboard',
91+
},
8692
});
8793
expect(application.navigateToApp).toHaveBeenCalledWith('superUltraVisualize', {
8894
path: undefined,
@@ -98,7 +104,9 @@ describe('embeddable state transfer', () => {
98104
});
99105
expect(store.set).toHaveBeenCalledWith(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, {
100106
kibanaIsNowForSports: 'extremeSportsKibana',
101-
[EMBEDDABLE_EDITOR_STATE_KEY]: { originatingApp: 'superUltraTestDashboard' },
107+
[buildKey(destinationApp, EMBEDDABLE_EDITOR_STATE_KEY)]: {
108+
originatingApp: 'superUltraTestDashboard',
109+
},
102110
});
103111
expect(application.navigateToApp).toHaveBeenCalledWith('superUltraVisualize', {
104112
path: undefined,
@@ -117,7 +125,10 @@ describe('embeddable state transfer', () => {
117125
state: { type: 'coolestType', input: { savedObjectId: '150' } },
118126
});
119127
expect(store.set).toHaveBeenCalledWith(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, {
120-
[EMBEDDABLE_PACKAGE_STATE_KEY]: { type: 'coolestType', input: { savedObjectId: '150' } },
128+
[buildKey(destinationApp, EMBEDDABLE_PACKAGE_STATE_KEY)]: {
129+
type: 'coolestType',
130+
input: { savedObjectId: '150' },
131+
},
121132
});
122133
expect(application.navigateToApp).toHaveBeenCalledWith('superUltraVisualize', {
123134
path: undefined,
@@ -133,7 +144,10 @@ describe('embeddable state transfer', () => {
133144
});
134145
expect(store.set).toHaveBeenCalledWith(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, {
135146
kibanaIsNowForSports: 'extremeSportsKibana',
136-
[EMBEDDABLE_PACKAGE_STATE_KEY]: { type: 'coolestType', input: { savedObjectId: '150' } },
147+
[buildKey(destinationApp, EMBEDDABLE_PACKAGE_STATE_KEY)]: {
148+
type: 'coolestType',
149+
input: { savedObjectId: '150' },
150+
},
137151
});
138152
expect(application.navigateToApp).toHaveBeenCalledWith('superUltraVisualize', {
139153
path: undefined,
@@ -151,53 +165,105 @@ describe('embeddable state transfer', () => {
151165

152166
it('can fetch an incoming editor state', async () => {
153167
store.set(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, {
154-
[EMBEDDABLE_EDITOR_STATE_KEY]: { originatingApp: 'superUltraTestDashboard' },
168+
[buildKey(testAppId, EMBEDDABLE_EDITOR_STATE_KEY)]: {
169+
originatingApp: 'superUltraTestDashboard',
170+
},
171+
});
172+
const fetchedState = stateTransfer.getIncomingEditorState(testAppId);
173+
expect(fetchedState).toEqual({ originatingApp: 'superUltraTestDashboard' });
174+
});
175+
176+
it('can fetch an incoming editor state and ignore state for other apps', async () => {
177+
store.set(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, {
178+
[buildKey('otherApp1', EMBEDDABLE_EDITOR_STATE_KEY)]: {
179+
originatingApp: 'whoops not me',
180+
},
181+
[buildKey('otherApp2', EMBEDDABLE_EDITOR_STATE_KEY)]: {
182+
originatingApp: 'otherTestDashboard',
183+
},
184+
[buildKey(testAppId, EMBEDDABLE_EDITOR_STATE_KEY)]: {
185+
originatingApp: 'superUltraTestDashboard',
186+
},
155187
});
156-
const fetchedState = stateTransfer.getIncomingEditorState();
188+
const fetchedState = stateTransfer.getIncomingEditorState(testAppId);
157189
expect(fetchedState).toEqual({ originatingApp: 'superUltraTestDashboard' });
190+
191+
const fetchedState2 = stateTransfer.getIncomingEditorState('otherApp2');
192+
expect(fetchedState2).toEqual({ originatingApp: 'otherTestDashboard' });
158193
});
159194

160195
it('incoming editor state returns undefined when state is not in the right shape', async () => {
161196
store.set(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, {
162-
[EMBEDDABLE_EDITOR_STATE_KEY]: { helloSportsKibana: 'superUltraTestDashboard' },
197+
[buildKey(testAppId, EMBEDDABLE_EDITOR_STATE_KEY)]: {
198+
helloSportsKibana: 'superUltraTestDashboard',
199+
},
163200
});
164-
const fetchedState = stateTransfer.getIncomingEditorState();
201+
const fetchedState = stateTransfer.getIncomingEditorState(testAppId);
165202
expect(fetchedState).toBeUndefined();
166203
});
167204

168205
it('can fetch an incoming embeddable package state', async () => {
169206
store.set(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, {
170-
[EMBEDDABLE_PACKAGE_STATE_KEY]: { type: 'skisEmbeddable', input: { savedObjectId: '123' } },
207+
[buildKey(testAppId, EMBEDDABLE_PACKAGE_STATE_KEY)]: {
208+
type: 'skisEmbeddable',
209+
input: { savedObjectId: '123' },
210+
},
171211
});
172-
const fetchedState = stateTransfer.getIncomingEmbeddablePackage();
212+
const fetchedState = stateTransfer.getIncomingEmbeddablePackage(testAppId);
173213
expect(fetchedState).toEqual({ type: 'skisEmbeddable', input: { savedObjectId: '123' } });
174214
});
175215

216+
it('can fetch an incoming embeddable package state and ignore state for other apps', async () => {
217+
store.set(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, {
218+
[buildKey(testAppId, EMBEDDABLE_PACKAGE_STATE_KEY)]: {
219+
type: 'skisEmbeddable',
220+
input: { savedObjectId: '123' },
221+
},
222+
[buildKey('testApp2', EMBEDDABLE_PACKAGE_STATE_KEY)]: {
223+
type: 'crossCountryEmbeddable',
224+
input: { savedObjectId: '456' },
225+
},
226+
});
227+
const fetchedState = stateTransfer.getIncomingEmbeddablePackage(testAppId);
228+
expect(fetchedState).toEqual({ type: 'skisEmbeddable', input: { savedObjectId: '123' } });
229+
230+
const fetchedState2 = stateTransfer.getIncomingEmbeddablePackage('testApp2');
231+
expect(fetchedState2).toEqual({
232+
type: 'crossCountryEmbeddable',
233+
input: { savedObjectId: '456' },
234+
});
235+
});
236+
176237
it('embeddable package state returns undefined when state is not in the right shape', async () => {
177238
store.set(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, {
178-
[EMBEDDABLE_PACKAGE_STATE_KEY]: { kibanaIsFor: 'sports' },
239+
[buildKey(testAppId, EMBEDDABLE_PACKAGE_STATE_KEY)]: { kibanaIsFor: 'sports' },
179240
});
180-
const fetchedState = stateTransfer.getIncomingEmbeddablePackage();
241+
const fetchedState = stateTransfer.getIncomingEmbeddablePackage(testAppId);
181242
expect(fetchedState).toBeUndefined();
182243
});
183244

184245
it('removes embeddable package key when removeAfterFetch is true', async () => {
185246
store.set(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, {
186-
[EMBEDDABLE_PACKAGE_STATE_KEY]: { type: 'coolestType', input: { savedObjectId: '150' } },
247+
[buildKey(testAppId, EMBEDDABLE_PACKAGE_STATE_KEY)]: {
248+
type: 'coolestType',
249+
input: { savedObjectId: '150' },
250+
},
187251
iSHouldStillbeHere: 'doing the sports thing',
188252
});
189-
stateTransfer.getIncomingEmbeddablePackage(true);
253+
stateTransfer.getIncomingEmbeddablePackage(testAppId, true);
190254
expect(store.get(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY)).toEqual({
191255
iSHouldStillbeHere: 'doing the sports thing',
192256
});
193257
});
194258

195259
it('removes editor state key when removeAfterFetch is true', async () => {
196260
store.set(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, {
197-
[EMBEDDABLE_EDITOR_STATE_KEY]: { originatingApp: 'superCoolFootballDashboard' },
261+
[buildKey(testAppId, EMBEDDABLE_EDITOR_STATE_KEY)]: {
262+
originatingApp: 'superCoolFootballDashboard',
263+
},
198264
iSHouldStillbeHere: 'doing the sports thing',
199265
});
200-
stateTransfer.getIncomingEditorState(true);
266+
stateTransfer.getIncomingEditorState(testAppId, true);
201267
expect(store.get(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY)).toEqual({
202268
iSHouldStillbeHere: 'doing the sports thing',
203269
});

src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.ts

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,38 +50,52 @@ export class EmbeddableStateTransfer {
5050
public getAppNameFromId = (appId: string): string | undefined => this.appList?.get(appId)?.title;
5151

5252
/**
53-
* Fetches an {@link EmbeddableEditorState | originating app} argument from the sessionStorage
53+
* Fetches an {@link EmbeddableEditorState | editor state} from the sessionStorage for the provided app id
5454
*
55+
* @param appId - The app to fetch incomingEditorState for
5556
* @param removeAfterFetch - Whether to remove the package state after fetch to prevent duplicates.
5657
*/
57-
public getIncomingEditorState(removeAfterFetch?: boolean): EmbeddableEditorState | undefined {
58+
public getIncomingEditorState(
59+
appId: string,
60+
removeAfterFetch?: boolean
61+
): EmbeddableEditorState | undefined {
5862
return this.getIncomingState<EmbeddableEditorState>(
5963
isEmbeddableEditorState,
64+
appId,
6065
EMBEDDABLE_EDITOR_STATE_KEY,
6166
{
6267
keysToRemoveAfterFetch: removeAfterFetch ? [EMBEDDABLE_EDITOR_STATE_KEY] : undefined,
6368
}
6469
);
6570
}
6671

67-
public clearEditorState() {
72+
/**
73+
* Clears the {@link EmbeddableEditorState | editor state} from the sessionStorage for the provided app id
74+
*
75+
* @param appId - The app to fetch incomingEditorState for
76+
* @param removeAfterFetch - Whether to remove the package state after fetch to prevent duplicates.
77+
*/
78+
public clearEditorState(appId: string) {
6879
const currentState = this.storage.get(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY);
6980
if (currentState) {
70-
delete currentState[EMBEDDABLE_EDITOR_STATE_KEY];
81+
delete currentState[this.buildKey(appId, EMBEDDABLE_EDITOR_STATE_KEY)];
7182
this.storage.set(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, currentState);
7283
}
7384
}
7485

7586
/**
76-
* Fetches an {@link EmbeddablePackageState | embeddable package} argument from the sessionStorage
87+
* Fetches an {@link EmbeddablePackageState | embeddable package} from the sessionStorage for the given AppId
7788
*
89+
* @param appId - The app to fetch EmbeddablePackageState for
7890
* @param removeAfterFetch - Whether to remove the package state after fetch to prevent duplicates.
7991
*/
8092
public getIncomingEmbeddablePackage(
93+
appId: string,
8194
removeAfterFetch?: boolean
8295
): EmbeddablePackageState | undefined {
8396
return this.getIncomingState<EmbeddablePackageState>(
8497
isEmbeddablePackageState,
98+
appId,
8599
EMBEDDABLE_PACKAGE_STATE_KEY,
86100
{
87101
keysToRemoveAfterFetch: removeAfterFetch ? [EMBEDDABLE_PACKAGE_STATE_KEY] : undefined,
@@ -122,20 +136,27 @@ export class EmbeddableStateTransfer {
122136
});
123137
}
124138

139+
private buildKey(appId: string, key: string) {
140+
return `${appId}-${key}`;
141+
}
142+
125143
private getIncomingState<IncomingStateType>(
126144
guard: (state: unknown) => state is IncomingStateType,
145+
appId: string,
127146
key: string,
128147
options?: {
129148
keysToRemoveAfterFetch?: string[];
130149
}
131150
): IncomingStateType | undefined {
132-
const incomingState = this.storage.get(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY)?.[key];
151+
const incomingState = this.storage.get(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY)?.[
152+
this.buildKey(appId, key)
153+
];
133154
const castState =
134155
!guard || guard(incomingState) ? (cloneDeep(incomingState) as IncomingStateType) : undefined;
135156
if (castState && options?.keysToRemoveAfterFetch) {
136157
const stateReplace = { ...this.storage.get(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY) };
137158
options.keysToRemoveAfterFetch.forEach((keyToRemove: string) => {
138-
delete stateReplace[keyToRemove];
159+
delete stateReplace[this.buildKey(appId, keyToRemove)];
139160
});
140161
this.storage.set(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, stateReplace);
141162
}
@@ -150,9 +171,9 @@ export class EmbeddableStateTransfer {
150171
const stateObject = options?.appendToExistingState
151172
? {
152173
...this.storage.get(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY),
153-
[key]: options.state,
174+
[this.buildKey(appId, key)]: options.state,
154175
}
155-
: { [key]: options?.state };
176+
: { [this.buildKey(appId, key)]: options?.state };
156177
this.storage.set(EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY, stateObject);
157178
await this.navigateToApp(appId, { path: options?.path });
158179
}

src/plugins/embeddable/public/public.api.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -590,11 +590,10 @@ export class EmbeddableStateTransfer {
590590
// Warning: (ae-forgotten-export) The symbol "ApplicationStart" needs to be exported by the entry point index.d.ts
591591
// Warning: (ae-forgotten-export) The symbol "PublicAppInfo" needs to be exported by the entry point index.d.ts
592592
constructor(navigateToApp: ApplicationStart['navigateToApp'], currentAppId$: ApplicationStart['currentAppId$'], appList?: ReadonlyMap<string, PublicAppInfo> | undefined, customStorage?: Storage);
593-
// (undocumented)
594-
clearEditorState(): void;
593+
clearEditorState(appId: string): void;
595594
getAppNameFromId: (appId: string) => string | undefined;
596-
getIncomingEditorState(removeAfterFetch?: boolean): EmbeddableEditorState | undefined;
597-
getIncomingEmbeddablePackage(removeAfterFetch?: boolean): EmbeddablePackageState | undefined;
595+
getIncomingEditorState(appId: string, removeAfterFetch?: boolean): EmbeddableEditorState | undefined;
596+
getIncomingEmbeddablePackage(appId: string, removeAfterFetch?: boolean): EmbeddablePackageState | undefined;
598597
// (undocumented)
599598
isTransferInProgress: boolean;
600599
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "kibana" does not have an export "ApplicationStart"

src/plugins/visualize/public/application/components/visualize_byvalue_editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const VisualizeByValueEditor = ({ onAppLeave }: VisualizeAppProps) => {
3434

3535
useEffect(() => {
3636
const { originatingApp: value, embeddableId: embeddableIdValue, valueInput: valueInputValue } =
37-
services.stateTransferService.getIncomingEditorState() || {};
37+
services.stateTransferService.getIncomingEditorState(VisualizeConstants.APP_ID) || {};
3838
setOriginatingApp(value);
3939
setValueInput(valueInputValue);
4040
setEmbeddableId(embeddableIdValue);

0 commit comments

Comments
 (0)