diff --git a/src/pages/StatementCreation.jsx b/src/pages/StatementCreation.jsx index cb464fb..2f996f3 100644 --- a/src/pages/StatementCreation.jsx +++ b/src/pages/StatementCreation.jsx @@ -189,8 +189,8 @@ function PairForm({ objectId, onPairSaved }) { const [saving, setSaving] = useState(false); // Auto-detect words in sentence fields - const needsWordDetection = type === 'text' || type === 'question'; - const allText = needsWordDetection ? `${question} ${positive} ${negative}` : ''; + // Always detect words from all sentence fields (for all types) + const allText = `${question} ${positive} ${negative}`; useEffect(() => { if (!allText.trim()) { setWordMap({}); return; } const t = setTimeout(async () => { @@ -342,8 +342,8 @@ function PairForm({ objectId, onPairSaved }) { {type && (
- {/* Word creation banner (text/question) */} - {(type === 'text' || type === 'question') && selection && ( + {/* Word creation banner — shown for any type when text is selected */} + {selection && (
{selection}" @@ -462,8 +462,8 @@ function PairForm({ objectId, onPairSaved }) { )} - {/* Detected words indicator */} - {(type === 'text' || type === 'question') && Object.keys(wordMap).length > 0 && ( + {/* Detected words indicator — shown for all types */} + {Object.keys(wordMap).length > 0 && (
Erkannte Wörter: {Object.entries(wordMap).map(([title, w]) => (