|
|
@@ -2,7 +2,7 @@ import { FormRenderProps, FlowNodeJSON, Field } from '@flowgram.ai/free-layout-e
|
|
|
import { SubCanvasRender } from '@flowgram.ai/free-container-plugin';
|
|
|
import { BatchVariableSelector, IFlowRefValue } from '@flowgram.ai/form-materials';
|
|
|
|
|
|
-import { useIsSidebar } from '../../hooks';
|
|
|
+import { useIsSidebar, useNodeRenderContext } from '../../hooks';
|
|
|
import { FormHeader, FormContent, FormOutputs, FormItem, Feedback } from '../../form-components';
|
|
|
|
|
|
interface LoopNodeJSON extends FlowNodeJSON {
|
|
|
@@ -13,7 +13,7 @@ interface LoopNodeJSON extends FlowNodeJSON {
|
|
|
|
|
|
export const LoopFormRender = ({ form }: FormRenderProps<LoopNodeJSON>) => {
|
|
|
const isSidebar = useIsSidebar();
|
|
|
- const readonly = !isSidebar;
|
|
|
+ const { readonly } = useNodeRenderContext();
|
|
|
|
|
|
const batchFor = (
|
|
|
<Field<IFlowRefValue> name={`batchFor`}>
|