Skip to content

Commit

Permalink
fix(openalex): ensure checkbox reflects selection state for all affil…
Browse files Browse the repository at this point in the history
…iations
  • Loading branch information
jerem1508 committed Nov 21, 2024
1 parent 7798b0a commit 28eedb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/pages/openalex-ror/results/views-selector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,16 @@ export default function OpenalexView({
<Row>
<Col>
<input
checked={selectedOpenAlex.length === allAffiliations.length}
className="fr-ml-2w"
type="checkbox"
onChange={() => {
if (selectedOpenAlex.length === 0) {
setSelectedOpenAlex(allAffiliations);
} else {
setSelectedOpenAlex([]);
}
}}
type="checkbox"
/>
</Col>
<Col xs="8">
Expand Down

0 comments on commit 28eedb2

Please sign in to comment.