Hide togglable columns when in Album Grid view mode. Fixes #2064

This commit is contained in:
Deluan
2023-01-16 15:00:33 -05:00
parent b6233e57b3
commit 4a054de3d5
2 changed files with 9 additions and 2 deletions
+6 -1
View File
@@ -86,6 +86,7 @@ const AlbumListActions = ({
...rest
}) => {
const isNotSmall = useMediaQuery((theme) => theme.breakpoints.up('sm'))
const albumView = useSelector((state) => state.albumView)
return (
<TopToolbar className={className} {...sanitizeListRestProps(rest)}>
{filters &&
@@ -97,7 +98,11 @@ const AlbumListActions = ({
context: 'button',
})}
{isNotSmall ? (
<ToggleFieldsMenu resource="album" topbarComponent={AlbumViewToggler} />
<ToggleFieldsMenu
resource="album"
topbarComponent={AlbumViewToggler}
hideColumns={albumView.grid}
/>
) : (
<AlbumViewToggler showTitle={false} />
)}