mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
redirect to visualize listing page when by value visualization editor doesn't have a value input (#84287) (#84345)
This commit is contained in:
parent
dfc0123247
commit
cfbb5e97d0
1 changed files with 3 additions and 1 deletions
|
@ -33,6 +33,7 @@ import {
|
||||||
import { VisualizeServices } from '../types';
|
import { VisualizeServices } from '../types';
|
||||||
import { VisualizeEditorCommon } from './visualize_editor_common';
|
import { VisualizeEditorCommon } from './visualize_editor_common';
|
||||||
import { VisualizeAppProps } from '../app';
|
import { VisualizeAppProps } from '../app';
|
||||||
|
import { VisualizeConstants } from '../..';
|
||||||
|
|
||||||
export const VisualizeByValueEditor = ({ onAppLeave }: VisualizeAppProps) => {
|
export const VisualizeByValueEditor = ({ onAppLeave }: VisualizeAppProps) => {
|
||||||
const [originatingApp, setOriginatingApp] = useState<string>();
|
const [originatingApp, setOriginatingApp] = useState<string>();
|
||||||
|
@ -52,7 +53,8 @@ export const VisualizeByValueEditor = ({ onAppLeave }: VisualizeAppProps) => {
|
||||||
setValueInput(valueInputValue);
|
setValueInput(valueInputValue);
|
||||||
setEmbeddableId(embeddableIdValue);
|
setEmbeddableId(embeddableIdValue);
|
||||||
if (!valueInputValue) {
|
if (!valueInputValue) {
|
||||||
history.back();
|
// if there is no value input to load, redirect to the visualize listing page.
|
||||||
|
services.history.replace(VisualizeConstants.LANDING_PAGE_PATH);
|
||||||
}
|
}
|
||||||
}, [services]);
|
}, [services]);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue