Skip to content

Commit

Permalink
fix: force search facet <MenuButton /> to render in a portal, remove …
Browse files Browse the repository at this point in the history
…hard-coded z-index
  • Loading branch information
robinpyon committed Sep 21, 2021
1 parent 08e69d9 commit 4afb51e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
9 changes: 1 addition & 8 deletions src/components/Controls/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {Box, Button, Flex, Inline} from '@sanity/ui'
import React, {FC} from 'react'
import {useDispatch} from 'react-redux'
import {Flex as LegacyFlex} from 'theme-ui'

import useTypedSelector from '../../hooks/useTypedSelector'
import {dialogActions} from '../../modules/dialog'
import {tagsActions} from '../../modules/tags'
Expand Down Expand Up @@ -37,13 +36,7 @@ const Controls: FC = () => {
}

return (
<Box
paddingY={2}
style={{
borderBottom: `1px solid ${hues.gray?.[900].hex}`,
zIndex: 2
}}
>
<Box paddingY={2} style={{borderBottom: `1px solid ${hues.gray?.[900].hex}`}}>
{/* Rows: search / filters / orders */}
<Box marginBottom={2}>
<Flex
Expand Down
1 change: 1 addition & 0 deletions src/components/SearchFacetsControl/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const SearchFacetsControl: FC = () => {
id="facets"
menu={<Menu>{renderMenuFacets(filteredFacets)}</Menu>}
placement="right-start"
portal
/>

{/* Clear facets button */}
Expand Down

0 comments on commit 4afb51e

Please sign in to comment.