fix dropdown bug
This commit is contained in:
parent
9d38ccc15d
commit
3f43958f08
1 changed files with 3 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ import {
|
|||
DropdownMenuItem,
|
||||
DropdownMenuTrigger,
|
||||
} from "../../../../components/ui/dropdown-menu";
|
||||
import { useUpdateNodeInternals } from "reactflow";
|
||||
|
||||
export default function OutputComponent({
|
||||
selected,
|
||||
|
|
@ -19,6 +20,7 @@ export default function OutputComponent({
|
|||
idx,
|
||||
}: outputComponentType) {
|
||||
const setNode = useFlowStore((state) => state.setNode);
|
||||
const updateNodeInternals = useUpdateNodeInternals();
|
||||
|
||||
if (types.length < 2) {
|
||||
return <span className={cn(frozen ? " text-ice" : "")}>{selected}</span>;
|
||||
|
|
@ -45,6 +47,7 @@ export default function OutputComponent({
|
|||
type;
|
||||
return newNode;
|
||||
});
|
||||
updateNodeInternals(nodeId);
|
||||
}}
|
||||
>
|
||||
{type}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue