@ -9,6 +9,7 @@ import {
|
|||||||
HStack,
|
HStack,
|
||||||
useColorModeValue,
|
useColorModeValue,
|
||||||
PopoverAnchor,
|
PopoverAnchor,
|
||||||
|
Portal,
|
||||||
} from '@chakra-ui/react'
|
} from '@chakra-ui/react'
|
||||||
import { Variable } from 'models'
|
import { Variable } from 'models'
|
||||||
import { useState, useRef, useEffect, ChangeEvent, ReactNode } from 'react'
|
import { useState, useRef, useEffect, ChangeEvent, ReactNode } from 'react'
|
||||||
@ -194,12 +195,15 @@ export const SearchableDropdown = ({
|
|||||||
)}
|
)}
|
||||||
</HStack>
|
</HStack>
|
||||||
</PopoverAnchor>
|
</PopoverAnchor>
|
||||||
|
<Portal>
|
||||||
<PopoverContent
|
<PopoverContent
|
||||||
maxH="35vh"
|
maxH="35vh"
|
||||||
overflowY="scroll"
|
overflowY="scroll"
|
||||||
role="menu"
|
role="menu"
|
||||||
w="inherit"
|
w="inherit"
|
||||||
shadow="lg"
|
shadow="lg"
|
||||||
|
onMouseDown={(e) => e.stopPropagation()}
|
||||||
|
onPointerDown={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
{filteredItems.length > 0 && (
|
{filteredItems.length > 0 && (
|
||||||
<>
|
<>
|
||||||
@ -228,6 +232,7 @@ export const SearchableDropdown = ({
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</PopoverContent>
|
</PopoverContent>
|
||||||
|
</Portal>
|
||||||
</Popover>
|
</Popover>
|
||||||
</Flex>
|
</Flex>
|
||||||
)
|
)
|
||||||
|
@ -50,6 +50,7 @@ test('should be configurable', async ({ page }) => {
|
|||||||
|
|
||||||
await page.click('[aria-label="Close"]')
|
await page.click('[aria-label="Close"]')
|
||||||
await page.click('text=Jump to Start in My link typebot 2')
|
await page.click('text=Jump to Start in My link typebot 2')
|
||||||
|
await page.waitForTimeout(1000)
|
||||||
await page.click('input[value="My link typebot 2"]', { clickCount: 3 })
|
await page.click('input[value="My link typebot 2"]', { clickCount: 3 })
|
||||||
await page.press('input[value="My link typebot 2"]', 'Backspace')
|
await page.press('input[value="My link typebot 2"]', 'Backspace')
|
||||||
await page.click('button >> text=My link typebot 1')
|
await page.click('button >> text=My link typebot 1')
|
||||||
|
Reference in New Issue
Block a user