Fixed chat priority on modal
This commit is contained in:
parent
667160b13c
commit
9e04c86dab
1 changed files with 2 additions and 1 deletions
|
|
@ -32,6 +32,7 @@ export default function IOModal({
|
||||||
setOpen,
|
setOpen,
|
||||||
disable,
|
disable,
|
||||||
}: IOModalPropsType): JSX.Element {
|
}: IOModalPropsType): JSX.Element {
|
||||||
|
const allNodes = useFlowStore((state) => state.nodes);
|
||||||
const inputs = useFlowStore((state) => state.inputs).filter(
|
const inputs = useFlowStore((state) => state.inputs).filter(
|
||||||
(input) => input.type !== "ChatInput"
|
(input) => input.type !== "ChatInput"
|
||||||
);
|
);
|
||||||
|
|
@ -117,7 +118,7 @@ export default function IOModal({
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setSelectedViewField(startView());
|
setSelectedViewField(startView());
|
||||||
setSelectedTab(inputs.length > 0 ? 1 : outputs.length > 0 ? 2 : 0);
|
setSelectedTab(inputs.length > 0 ? 1 : outputs.length > 0 ? 2 : 0);
|
||||||
}, [inputs.length, outputs.length, open]);
|
}, [allNodes]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseModal
|
<BaseModal
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue