diff --git a/app/src/components/OutputsTable/OutputCell/PromptModal.tsx b/app/src/components/OutputsTable/OutputCell/PromptModal.tsx index 4b6c70a..79e0139 100644 --- a/app/src/components/OutputsTable/OutputCell/PromptModal.tsx +++ b/app/src/components/OutputsTable/OutputCell/PromptModal.tsx @@ -40,9 +40,14 @@ export default function PromptModal(props: { cell: NonNullable; disclosure: UseDisclosureReturn; }) { - const { data } = api.scenarioVariantCells.getTemplatedPromptMessage.useQuery({ - cellId: props.cell.id, - }); + const { data } = api.scenarioVariantCells.getTemplatedPromptMessage.useQuery( + { + cellId: props.cell.id, + }, + { + enabled: props.disclosure.isOpen, + }, + ); return (