mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -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 { VisualizeEditorCommon } from './visualize_editor_common';
|
||||
import { VisualizeAppProps } from '../app';
|
||||
import { VisualizeConstants } from '../..';
|
||||
|
||||
export const VisualizeByValueEditor = ({ onAppLeave }: VisualizeAppProps) => {
|
||||
const [originatingApp, setOriginatingApp] = useState<string>();
|
||||
|
@ -52,7 +53,8 @@ export const VisualizeByValueEditor = ({ onAppLeave }: VisualizeAppProps) => {
|
|||
setValueInput(valueInputValue);
|
||||
setEmbeddableId(embeddableIdValue);
|
||||
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]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue