From 0a5d543bd3f88627e0583a87af5eb801135556b3 Mon Sep 17 00:00:00 2001 From: vkushwah <77838340+vkushwah@users.noreply.github.com> Date: Tue, 20 Sep 2022 02:46:38 +0530 Subject: [PATCH] fixed backspace crashing UI issue (#1034) Signed-off-by: Vishal Kushwah Signed-off-by: Vishal Kushwah Co-authored-by: Vishal Kushwah --- .../config_panes/config_controls/data_config_panel_item.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/data_config_panel_item.tsx b/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/data_config_panel_item.tsx index 87d6802d0..7e7d54f26 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/data_config_panel_item.tsx +++ b/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/data_config_panel_item.tsx @@ -389,12 +389,13 @@ export const DataConfigPanelItem = ({ fieldOptionList, visualizations }: any) => value={configList.span?.interval ?? 1} min={1} onChange={(e) => { + e.persist(); setConfigList((staleState) => { return { ...staleState, span: { ...staleState.span, - interval: e.target.value, + interval: e.target?.value ?? 1, }, }; });