🐛 Fix "Pick an image" popover going behind (#2099)

Closes #2096
This commit is contained in:
Enzo 2025-03-26 04:06:00 -03:00 committed by GitHub
parent dc01e0bb3c
commit 0606fa3d8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,7 @@ import {
Popover,
PopoverContent,
PopoverTrigger,
Portal,
Stack,
Text,
} from "@chakra-ui/react";
@ -77,26 +78,28 @@ export const PictureChoiceItemSettings = ({
: t("blocks.inputs.picture.itemSettings.image.pick.label")}
</Button>
</PopoverTrigger>
<PopoverContent p="4" w="500px">
<ImageUploadContent
uploadFileProps={{
workspaceId,
typebotId,
blockId,
itemId: item.id,
}}
defaultUrl={item.pictureSrc}
onSubmit={(url) => {
updateImage(url);
onClose();
}}
additionalTabs={{
giphy: true,
unsplash: true,
icon: true,
}}
/>
</PopoverContent>
<Portal>
<PopoverContent p="4" w="500px">
<ImageUploadContent
uploadFileProps={{
workspaceId,
typebotId,
blockId,
itemId: item.id,
}}
defaultUrl={item.pictureSrc}
onSubmit={(url) => {
updateImage(url);
onClose();
}}
additionalTabs={{
giphy: true,
unsplash: true,
icon: true,
}}
/>
</PopoverContent>
</Portal>
</>
)}
</Popover>