Skip to content

Commit

Permalink
fix(tags): Preserve user input in tags
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Feb 16, 2024
1 parent 3682cd2 commit 03026ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/pages/filters.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export default function Filters({ sendQuery }) {
...affiliations.map((affiliation) => ({ label: affiliation, source: 'user' })),
...rorNames.flat().map((name) => ({ label: name, source: 'ror' })),
];
allTags = [...new Map(allTags.map((v) => [v.label.toLowerCase(), v])).values()];
// Remove duplicates
allTags = [...new Map(allTags.reverse().map((v) => [v.label.toLowerCase(), v])).values()].reverse();
setTags(allTags);
}
};
Expand Down

0 comments on commit 03026ef

Please sign in to comment.