Skip to content

Commit

Permalink
affiliations: render organization acronym in subheader
Browse files Browse the repository at this point in the history
  • Loading branch information
slint committed Nov 26, 2024
1 parent 18dbf6d commit 0a65909
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,14 @@ const makeSubheader = (creatibutor, isOrganization) => {
}`.trim();
} else {
return (
creatibutor?.affiliations?.map((affiliation) => affiliation.name)?.join(", ") ||
""
creatibutor?.affiliations
?.map((affiliation) => {
if (affiliation.acronym?.length > 0) {
return `${affiliation.name} (${affiliation.acronym})`;
}
return affiliation.name;
})
?.join(", ") || ""
);
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/lib/forms/RemoteSelectField.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export class RemoteSelectField extends Component {

onSelectValue = (event, { options, value, ...otherData }, callbackFunc) => {
const { multiple } = this.props;
const newSelectedSuggestions = options.filter(
(item) => multiple ? value.includes(item.value) : item.value === value
const newSelectedSuggestions = options.filter((item) =>
multiple ? value.includes(item.value) : item.value === value
);

this.setState(
Expand Down

0 comments on commit 0a65909

Please sign in to comment.