Hide togglable columns when in Album Grid view mode. Fixes #2064
This commit is contained in:
@@ -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} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user