Skip to content

Commit 5b26ad4

Browse files
committed
fix(ui): TE-XXXX fix required properties getting reset on applying advanced properties
1 parent 25a8dba commit 5b26ad4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

thirdeye-ui/src/app/components/additional-filters-drawer/additional-filters-drawer.component.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import {
2424
Typography,
2525
} from "@material-ui/core";
2626
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
27-
import { isEmpty } from "lodash";
28-
import React, { FunctionComponent, useState } from "react";
27+
import { cloneDeep, isEmpty } from "lodash";
28+
import React, { FunctionComponent, useEffect, useState } from "react";
2929
import { useTranslation } from "react-i18next";
3030
import {
3131
PropertyConfigValueTypes,
@@ -65,6 +65,10 @@ export const AdditonalFiltersDrawer: FunctionComponent<AdditonalFiltersDrawerPro
6565
...defaultValues,
6666
});
6767

68+
useEffect(() => {
69+
setLocalCopyOfProperties({ ...defaultValues });
70+
}, [defaultValues]);
71+
6872
const handleOnChange = (
6973
key: string,
7074
value: PropertyConfigValueTypes

0 commit comments

Comments
 (0)