* fix: popover does not close when clicking outside in SwitchSpace. (#720)

This commit is contained in:
Auxa 2025-02-13 01:14:21 +09:00 committed by GitHub
parent 7121771f92
commit ae842f94d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,7 +13,7 @@ interface SwitchSpaceProps {
export function SwitchSpace({ spaceName, spaceSlug }: SwitchSpaceProps) {
const navigate = useNavigate();
const [opened, { close, open }] = useDisclosure(false);
const [opened, { close, open, toggle }] = useDisclosure(false);
const handleSelect = (value: string) => {
if (value) {
@ -29,6 +29,7 @@ export function SwitchSpace({ spaceName, spaceSlug }: SwitchSpaceProps) {
withArrow
shadow="md"
opened={opened}
onChange={toggle}
>
<Popover.Target>
<Button