mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-19 21:04:33 +08:00
🚸 (builder) prevent auto opening block settings for buttons types
This commit is contained in:
parent
a0dca297fd
commit
5ceaa961a1
@ -4,6 +4,7 @@ import { useTypebot } from "@/features/editor/providers/TypebotProvider";
|
||||
import { Fade, Flex, type FlexProps, useEventListener } from "@chakra-ui/react";
|
||||
import { createId } from "@paralleldrive/cuid2";
|
||||
import type { BlockV6 } from "@typebot.io/blocks-core/schemas/schema";
|
||||
import { InputBlockType } from "@typebot.io/blocks-inputs/constants";
|
||||
import { GraphNavigation } from "@typebot.io/prisma/enum";
|
||||
import type {
|
||||
EdgeWithTotalUsers,
|
||||
@ -161,7 +162,13 @@ export const Graph = ({
|
||||
});
|
||||
setDraggedBlock(undefined);
|
||||
setDraggedBlockType(undefined);
|
||||
if (newBlockId) setOpenedBlockId(newBlockId);
|
||||
if (
|
||||
newBlockId &&
|
||||
draggedBlockType !== InputBlockType.CHOICE &&
|
||||
draggedBlockType !== InputBlockType.PICTURE_CHOICE
|
||||
) {
|
||||
setOpenedBlockId(newBlockId);
|
||||
}
|
||||
};
|
||||
|
||||
const handleCaptureMouseDown = (e: MouseEvent) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user