mirror of
https://github.com/strapi/strapi.git
synced 2025-11-04 20:07:19 +00:00
tooltip for every table headers + fix asset count displayed
This commit is contained in:
parent
bd3f68f70f
commit
98a39535e9
@ -80,8 +80,8 @@ export const TableList = ({
|
|||||||
}
|
}
|
||||||
key={key}
|
key={key}
|
||||||
>
|
>
|
||||||
{isSortable ? (
|
<Tooltip label={isSortable ? sortLabel : tableHeaderLabel}>
|
||||||
<Tooltip label={sortLabel}>
|
{isSortable ? (
|
||||||
<Typography
|
<Typography
|
||||||
onClick={() => handleClickSort(isSorted, name)}
|
onClick={() => handleClickSort(isSorted, name)}
|
||||||
as={isSorted ? 'span' : 'button'}
|
as={isSorted ? 'span' : 'button'}
|
||||||
@ -91,12 +91,12 @@ export const TableList = ({
|
|||||||
>
|
>
|
||||||
{tableHeaderLabel}
|
{tableHeaderLabel}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Tooltip>
|
) : (
|
||||||
) : (
|
<Typography textColor="neutral600" variant="sigma">
|
||||||
<Typography textColor="neutral600" variant="sigma">
|
{tableHeaderLabel}
|
||||||
{tableHeaderLabel}
|
</Typography>
|
||||||
</Typography>
|
)}
|
||||||
)}
|
</Tooltip>
|
||||||
</Th>
|
</Th>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@ -136,6 +136,7 @@ export const MediaLibrary = () => {
|
|||||||
assetsData?.results?.map((asset) => ({ ...asset, type: 'asset', isSelectable: canUpdate })) ||
|
assetsData?.results?.map((asset) => ({ ...asset, type: 'asset', isSelectable: canUpdate })) ||
|
||||||
[];
|
[];
|
||||||
const assetCount = assets?.length ?? 0;
|
const assetCount = assets?.length ?? 0;
|
||||||
|
const totalAssetCount = assetsData?.pagination?.total;
|
||||||
|
|
||||||
const isLoading = isCurrentFolderLoading || foldersLoading || permissionsLoading || assetsLoading;
|
const isLoading = isCurrentFolderLoading || foldersLoading || permissionsLoading || assetsLoading;
|
||||||
const [showUploadAssetDialog, setShowUploadAssetDialog] = useState(false);
|
const [showUploadAssetDialog, setShowUploadAssetDialog] = useState(false);
|
||||||
@ -458,7 +459,7 @@ export const MediaLibrary = () => {
|
|||||||
id: getTrad('list.assets.title'),
|
id: getTrad('list.assets.title'),
|
||||||
defaultMessage: 'Assets ({count})',
|
defaultMessage: 'Assets ({count})',
|
||||||
},
|
},
|
||||||
{ count: assetCount }
|
{ count: totalAssetCount }
|
||||||
)) ||
|
)) ||
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user