🐛 (editor) Fix popover zIndex

This commit is contained in:
Baptiste Arnaud
2023-01-06 15:03:39 +01:00
parent fadf34ad61
commit 2d20f1c41c
7 changed files with 35 additions and 9 deletions

View File

@@ -20,6 +20,7 @@ import React, { useState, useRef, ChangeEvent, useEffect } from 'react'
import { useDebouncedCallback } from 'use-debounce'
import { byId, env, isDefined, isNotDefined } from 'utils'
import { useOutsideClick } from '@/hooks/useOutsideClick'
import { useParentModal } from '@/features/graph'
type Props = {
initialVariableId?: string
@@ -62,6 +63,7 @@ export const VariableSearchInput = ({
const inputRef = useRef<HTMLInputElement>(null)
const createVariableItemRef = useRef<HTMLButtonElement | null>(null)
const itemsRef = useRef<(HTMLButtonElement | null)[]>([])
const { ref: parentModalRef } = useParentModal()
useOutsideClick({
ref: dropdownRef,
@@ -190,7 +192,7 @@ export const VariableSearchInput = ({
{...inputProps}
/>
</PopoverAnchor>
<Portal>
<Portal containerRef={parentModalRef}>
<PopoverContent
maxH="35vh"
overflowY="scroll"