Merge pull request #1038 from JoeMakuta/fix/narrow-effect-use-lazy-state-init-add-memo

fix : narrow effect, use lazy state init and add memo
This commit is contained in:
Rohan Verma 2026-03-30 15:22:44 -07:00 committed by GitHub
commit 25b068f420
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 17 additions and 23 deletions

View file

@ -38,7 +38,7 @@ export function PromptConfigManager({ searchSpaceId }: PromptConfigManagerProps)
if (searchSpace) {
setCustomInstructions(searchSpace.qna_custom_instructions || "");
}
}, [searchSpace]);
}, [searchSpace?.qna_custom_instructions]);
// Derive hasChanges during render
const hasChanges = !!searchSpace && (searchSpace.qna_custom_instructions || "") !== customInstructions;