Skip to content

Commit

Permalink
subjects: updated subject serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
0einstein0 committed Dec 11, 2024
1 parent 39cc7b5 commit 97e0cc7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export class SubjectAutocompleteDropdown extends Component {
const scheme = subject.scheme ? `(${subject.scheme}) ` : "";
return {
text: scheme + subject.subject,
value: subject.subject,
key: subject.subject,
value: subject.id,
key: subject.id,
...(subject.id ? { id: subject.id } : {}),
subject: subject.subject,
};
Expand Down Expand Up @@ -84,7 +84,7 @@ export class SubjectAutocompleteDropdown extends Component {
);
}}
label={labelContent}
value={getIn(values, fieldPath, []).map((val) => val.subject)}
value={getIn(values, fieldPath, []).map((val) => val.id)}
allowAdditions={allowAdditions}
width={width}
/>
Expand Down

0 comments on commit 97e0cc7

Please sign in to comment.