Skip to content

Commit

Permalink
Fixed crash issue on data configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Dipra Aich <dipra_aich@persistent.com>
  • Loading branch information
DipraAich committed Sep 29, 2022
1 parent c123cbd commit 565a598
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ export const DataConfigPanelItem = ({
}
}, [userConfigs?.dataConfig, visualizations.vis.name]);

useEffect(() => {
if (isAddConfigClicked) {
setIsAddConfigClicked(false);
}
}, [visualizations.vis.name]);

const updateList = (value: string, field: string) => {
const { index, name } = selectedConfigItem;
let listItem = { ...configList[name][index] };
Expand Down Expand Up @@ -261,7 +267,8 @@ export const DataConfigPanelItem = ({

const getCommonUI = (title: string) => {
const { index, name } = selectedConfigItem;
const selectedObj = configList[name][index];
const selectedObj =
configList[name][index] === undefined ? { label: '', name: '' } : configList[name][index];
const isDimensions = name === GROUPBY;
return (
<>
Expand Down

0 comments on commit 565a598

Please sign in to comment.