2
0

🐛 Fix theme avatar form variable click unfocus bug

This commit is contained in:
Baptiste Arnaud
2023-03-10 09:27:23 +01:00
parent 53cdb35984
commit 5435452ab0

View File

@@ -11,7 +11,6 @@ import {
Image, Image,
Flex, Flex,
Box, Box,
Portal,
} from '@chakra-ui/react' } from '@chakra-ui/react'
import { ImageUploadContent } from '@/components/ImageUploadContent' import { ImageUploadContent } from '@/components/ImageUploadContent'
import { DefaultAvatar } from '../DefaultAvatar' import { DefaultAvatar } from '../DefaultAvatar'
@@ -70,15 +69,13 @@ export const AvatarForm = ({
/> />
)} )}
</PopoverTrigger> </PopoverTrigger>
<Portal> <PopoverContent p="4">
<PopoverContent p="4"> <ImageUploadContent
<ImageUploadContent filePath={uploadFilePath}
filePath={uploadFilePath} defaultUrl={avatarProps?.url}
defaultUrl={avatarProps?.url} onSubmit={handleImageUrl}
onSubmit={handleImageUrl} />
/> </PopoverContent>
</PopoverContent>
</Portal>
</Popover> </Popover>
)} )}
</Flex> </Flex>