Skip to content

Commit eb241f0

Browse files
committed
redirect to visualize listing page when by value visualization editor doesn't have a value input (#84287)
1 parent 9440389 commit eb241f0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
import { VisualizeServices } from '../types';
3434
import { VisualizeEditorCommon } from './visualize_editor_common';
3535
import { VisualizeAppProps } from '../app';
36+
import { VisualizeConstants } from '../..';
3637

3738
export const VisualizeByValueEditor = ({ onAppLeave }: VisualizeAppProps) => {
3839
const [originatingApp, setOriginatingApp] = useState<string>();
@@ -52,7 +53,8 @@ export const VisualizeByValueEditor = ({ onAppLeave }: VisualizeAppProps) => {
5253
setValueInput(valueInputValue);
5354
setEmbeddableId(embeddableIdValue);
5455
if (!valueInputValue) {
55-
history.back();
56+
// if there is no value input to load, redirect to the visualize listing page.
57+
services.history.replace(VisualizeConstants.LANDING_PAGE_PATH);
5658
}
5759
}, [services]);
5860

0 commit comments

Comments
 (0)