From f715362b7adba55d1e1c10b9321f8ea7f791c84f Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Wed, 28 Sep 2022 11:43:50 +0530 Subject: [PATCH] Bug Fixed Include Column for profiler settings disapear #7759 (#7761) * Bug Fixed Include Column for profiler settings disapear #7759 * fixed unit test --- .../TableProfiler/Component/ProfilerSettingsModal.test.tsx | 5 ----- .../TableProfiler/Component/ProfilerSettingsModal.tsx | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ProfilerSettingsModal.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ProfilerSettingsModal.test.tsx index 9277627a576..67cf5f6f9b3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ProfilerSettingsModal.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ProfilerSettingsModal.test.tsx @@ -17,11 +17,6 @@ import { MOCK_TABLE } from '../../../mocks/TableData.mock'; import { ProfilerSettingsModalProps } from '../TableProfiler.interface'; import ProfilerSettingsModal from './ProfilerSettingsModal'; -jest.mock('antd/lib/form', () => { - return jest - .fn() - .mockImplementation(({ children }) =>
{children}
); -}); jest.mock('antd/lib/grid', () => ({ Row: jest.fn().mockImplementation(({ children }) =>
{children}
), Col: jest diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ProfilerSettingsModal.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ProfilerSettingsModal.tsx index f300a7c293b..fe1e455bd43 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ProfilerSettingsModal.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ProfilerSettingsModal.tsx @@ -47,6 +47,7 @@ const ProfilerSettingsModal: React.FC = ({ visible, onVisibilityChange, }) => { + const [form] = Form.useForm(); const [data, setData] = useState(); const [sqlQuery, setSqlQuery] = useState(''); const [profileSample, setProfileSample] = useState(100); @@ -94,6 +95,7 @@ const ProfilerSettingsModal: React.FC = ({ return col; }); + form.setFieldsValue({ includeColumns: includeColValue }); setIncludeCol(includeColValue); } }; @@ -261,6 +263,7 @@ const ProfilerSettingsModal: React.FC = ({