mirror of
https://github.com/docmost/docmost.git
synced 2025-11-12 23:32:37 +10:00
* fix: popover does not close when clicking outside in SwitchSpace. (#720)
This commit is contained in:
@ -13,7 +13,7 @@ interface SwitchSpaceProps {
|
|||||||
|
|
||||||
export function SwitchSpace({ spaceName, spaceSlug }: SwitchSpaceProps) {
|
export function SwitchSpace({ spaceName, spaceSlug }: SwitchSpaceProps) {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [opened, { close, open }] = useDisclosure(false);
|
const [opened, { close, open, toggle }] = useDisclosure(false);
|
||||||
|
|
||||||
const handleSelect = (value: string) => {
|
const handleSelect = (value: string) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
@ -29,6 +29,7 @@ export function SwitchSpace({ spaceName, spaceSlug }: SwitchSpaceProps) {
|
|||||||
withArrow
|
withArrow
|
||||||
shadow="md"
|
shadow="md"
|
||||||
opened={opened}
|
opened={opened}
|
||||||
|
onChange={toggle}
|
||||||
>
|
>
|
||||||
<Popover.Target>
|
<Popover.Target>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Reference in New Issue
Block a user