Skip to content

Commit bc3f6b5

Browse files
farhank31Farhan Khan
andauthored
ATLAS-5083 : (React UI)Wrong parameter is added in the API request body, when the entity detail page is refreshed after selecting Table tab. (#415)
Co-authored-by: Farhan Khan <farhan.khan@freestoninfotech.com>
1 parent f31aa0b commit bc3f6b5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dashboard/src/views/DetailPage/EntityDetailTabs/ProfileTab.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ const ProfileTab: React.FC<EntityDetailTabProps> = ({ entity }) => {
8484
pagination?: any;
8585
sorting: [{ id: string; desc: boolean }];
8686
}) => {
87+
if (!entity?.typeName) {
88+
return;
89+
}
8790
const { pageSize, pageIndex } = pagination || {};
8891
if (pageIndex > 1) {
8992
searchParams.set("pageOffset", `${pageSize * pageIndex}`);
@@ -126,7 +129,7 @@ const ProfileTab: React.FC<EntityDetailTabProps> = ({ entity }) => {
126129
dispatch({ type: "failure", error });
127130
}
128131
},
129-
[searchParams]
132+
[searchParams, entity]
130133
);
131134

132135
const handleSwitchChangeEntities = (
@@ -273,7 +276,7 @@ const ProfileTab: React.FC<EntityDetailTabProps> = ({ entity }) => {
273276
justifyContent="right"
274277
alignItems="center"
275278
marginBottom="0.75rem"
276-
position="absolute"
279+
position="relative"
277280
right={0}
278281
>
279282
<FormGroup>

0 commit comments

Comments
 (0)