Skip to content

Commit

Permalink
Fix: Reloading of permissions tab when permissions panel is opened (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Onokaev authored Oct 6, 2022
1 parent e9c2e8c commit 2e44443
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/views/authentication/profile/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const Profile = (props: any) => {
return (
<div className={classes.profile} style={profileContainerStyles}>
{showProfileComponent(persona)}
{permissionsPanelOpen && <Permission/>}
{permissionsPanelOpen && <Permission panel={true}/>}
</div>
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/app/views/query-runner/request/permissions/Permission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import messages from '../../../../../messages';

export const Permission = ( permissionProps?: IPermissionProps ) : JSX.Element => {

const { sampleQuery, scopes, dimensions, authToken, permissionsPanelOpen } =
const { sampleQuery, scopes, dimensions, authToken } =
useSelector( (state: IRootState) => state );
const { pending: loading } = scopes;
const tokenPresent = !!authToken.token;
const dispatch = useDispatch();
const panel = permissionsPanelOpen
const panel = permissionProps?.panel;

const classProps = {
styles: permissionProps!.styles,
Expand Down Expand Up @@ -240,7 +240,7 @@ export const Permission = ( permissionProps?: IPermissionProps ) : JSX.Element =

return(
<>
{permissionsPanelOpen ? displayPermissionsPanel() : displayPermissionsAsTab()}
{panel ? displayPermissionsPanel() : displayPermissionsAsTab()}
</>
);
}

0 comments on commit 2e44443

Please sign in to comment.