Fixed sentence header mapping
This commit is contained in:
@@ -39,17 +39,14 @@ const MatchSentencesEdit = (props: Props) => {
|
|||||||
label={`Sentence ${index + 1}`}
|
label={`Sentence ${index + 1}`}
|
||||||
name="sentence"
|
name="sentence"
|
||||||
required
|
required
|
||||||
value={sentence.sentence.heading}
|
value={sentence.sentence}
|
||||||
onChange={(value) =>
|
onChange={(value) =>
|
||||||
updateExercise({
|
updateExercise({
|
||||||
sentences: exercise.sentences.map((iSol) =>
|
sentences: exercise.sentences.map((iSol) =>
|
||||||
iSol.id === sentence.id
|
iSol.id === sentence.id
|
||||||
? {
|
? {
|
||||||
...iSol,
|
...iSol,
|
||||||
sentence: {
|
sentence: value,
|
||||||
...iSol.sentence,
|
|
||||||
heading: value,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
: iSol
|
: iSol
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user