tooltip for every table headers + fix asset count displayed

This commit is contained in:
Julie Plantey 2022-12-22 10:13:06 +01:00
parent bd3f68f70f
commit 98a39535e9
2 changed files with 10 additions and 9 deletions

View File

@ -80,8 +80,8 @@ export const TableList = ({
}
key={key}
>
{isSortable ? (
<Tooltip label={sortLabel}>
<Tooltip label={isSortable ? sortLabel : tableHeaderLabel}>
{isSortable ? (
<Typography
onClick={() => handleClickSort(isSorted, name)}
as={isSorted ? 'span' : 'button'}
@ -91,12 +91,12 @@ export const TableList = ({
>
{tableHeaderLabel}
</Typography>
</Tooltip>
) : (
<Typography textColor="neutral600" variant="sigma">
{tableHeaderLabel}
</Typography>
)}
) : (
<Typography textColor="neutral600" variant="sigma">
{tableHeaderLabel}
</Typography>
)}
</Tooltip>
</Th>
);
})}

View File

@ -136,6 +136,7 @@ export const MediaLibrary = () => {
assetsData?.results?.map((asset) => ({ ...asset, type: 'asset', isSelectable: canUpdate })) ||
[];
const assetCount = assets?.length ?? 0;
const totalAssetCount = assetsData?.pagination?.total;
const isLoading = isCurrentFolderLoading || foldersLoading || permissionsLoading || assetsLoading;
const [showUploadAssetDialog, setShowUploadAssetDialog] = useState(false);
@ -458,7 +459,7 @@ export const MediaLibrary = () => {
id: getTrad('list.assets.title'),
defaultMessage: 'Assets ({count})',
},
{ count: assetCount }
{ count: totalAssetCount }
)) ||
''
}