Skip to content

Commit 46d47e2

Browse files
authored
Merge pull request #809 from amitamrutiya/fix-catalog-table
Fix some issue in the catalog design table
2 parents 4222aad + d97abce commit 46d47e2

File tree

3 files changed

+23
-19
lines changed

3 files changed

+23
-19
lines changed

src/custom/CatalogDesignTable/columnConfig.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { MUIDataTableColumn, MUIDataTableMeta } from 'mui-datatables';
44
import { FacebookShareButton, LinkedinShareButton, TwitterShareButton } from 'react-share';
55
import { Avatar, Box, Grid, Typography } from '../../base';
6+
import { CLOUD_URL } from '../../constants/constants';
67
import { iconMedium } from '../../constants/iconsSizes';
78
import {
89
ChainIcon,
@@ -165,7 +166,7 @@ export const createDesignColumns = ({
165166
alt={displayName}
166167
src={avatar_url}
167168
onClick={() => {
168-
window.location.href = `/user/${user_id}`;
169+
window.open(`${CLOUD_URL}/user/${user_id}`, '_blank');
169170
}}
170171
>
171172
{!avatar_url && <PersonIcon />}

src/custom/ResponsiveDataTable.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,12 @@ export const DataTableEllipsisMenu: React.FC<{
122122
const dataTableTheme = (theme: Theme, backgroundColor?: string) =>
123123
createTheme({
124124
components: {
125-
MUIDataTable: {
125+
MuiPaper: {
126126
styleOverrides: {
127-
paper: {
127+
root: {
128128
background: backgroundColor || theme.palette.background.default,
129-
maxWidth: '-moz-available'
129+
maxWidth: '-moz-available',
130+
width: '-moz-available'
130131
}
131132
}
132133
},
@@ -386,7 +387,7 @@ const ResponsiveDataTable = ({
386387
});
387388
updateCols && updateCols([...columns]);
388389
// eslint-disable-next-line react-hooks/exhaustive-deps
389-
}, [columnVisibility, updateCols]);
390+
}, [columnVisibility, updateCols, data]);
390391

391392
React.useEffect(() => {
392393
updateColumnsEffect();

src/custom/TooltipIcon.tsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,23 @@ export function TooltipIcon({
2020
}: TooltipIconProps): JSX.Element {
2121
return (
2222
<CustomTooltip title={title} arrow={arrow}>
23-
<IconButton
24-
onClick={onClick}
25-
sx={{
26-
'&:hover': {
27-
'& svg': {
28-
fill: '#00d3a9'
23+
<div>
24+
<IconButton
25+
onClick={onClick}
26+
sx={{
27+
'&:hover': {
28+
'& svg': {
29+
fill: '#00d3a9'
30+
},
31+
borderRadius: '4px'
2932
},
30-
borderRadius: '4px'
31-
},
32-
...(style as SxProps)
33-
}}
34-
disableRipple
35-
>
36-
{icon}
37-
</IconButton>
33+
...(style as SxProps)
34+
}}
35+
disableRipple
36+
>
37+
{icon}
38+
</IconButton>
39+
</div>
3840
</CustomTooltip>
3941
);
4042
}

0 commit comments

Comments
 (0)