Fix csv import dropdown overlay (#9262)
## Context Fixing https://github.com/twentyhq/twenty/issues/9245 using the new OverlayContainer component instead of custom styled component ## Test <img width="352" alt="Screenshot 2024-12-27 at 16 52 55" src="https://github.com/user-attachments/assets/27ebcdd1-8fe4-425b-995b-bc4e7220192c" />
This commit is contained in:
@ -18,6 +18,7 @@ import { DropdownMenu } from '@/ui/layout/dropdown/components/DropdownMenu';
|
||||
import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
|
||||
import { DropdownMenuSearchInput } from '@/ui/layout/dropdown/components/DropdownMenuSearchInput';
|
||||
import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownMenuSeparator';
|
||||
import { OverlayContainer } from '@/ui/layout/overlay/components/OverlayContainer';
|
||||
import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';
|
||||
import { useUpdateEffect } from '~/hooks/useUpdateEffect';
|
||||
|
||||
@ -25,13 +26,6 @@ const StyledFloatingDropdown = styled.div`
|
||||
z-index: ${({ theme }) => theme.lastLayerZIndex};
|
||||
`;
|
||||
|
||||
const StyledDropdownMenu = styled(DropdownMenu)`
|
||||
background-color: ${({ theme }) => theme.background.primary};
|
||||
border: 1px solid ${({ theme }) => theme.border.color.light};
|
||||
border-radius: ${({ theme }) => theme.border.radius.sm};
|
||||
box-shadow: ${({ theme }) => theme.boxShadow.light};
|
||||
`;
|
||||
|
||||
interface MatchColumnSelectProps {
|
||||
onChange: (value: ReadonlyDeep<SelectOption> | null) => void;
|
||||
value?: ReadonlyDeep<SelectOption>;
|
||||
@ -128,7 +122,8 @@ export const MatchColumnSelect = ({
|
||||
{isOpen &&
|
||||
createPortal(
|
||||
<StyledFloatingDropdown ref={refs.setFloating} style={floatingStyles}>
|
||||
<StyledDropdownMenu
|
||||
<OverlayContainer>
|
||||
<DropdownMenu
|
||||
data-select-disable
|
||||
ref={dropdownContainerRef}
|
||||
// width={refs.domReference.current?.clientWidth}
|
||||
@ -169,7 +164,8 @@ export const MatchColumnSelect = ({
|
||||
<MenuItem key="No result" text="No result" />
|
||||
)}
|
||||
</DropdownMenuItemsContainer>
|
||||
</StyledDropdownMenu>
|
||||
</DropdownMenu>
|
||||
</OverlayContainer>
|
||||
</StyledFloatingDropdown>,
|
||||
document.body,
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user