Skip to content

Commit

Permalink
feat(openalex): Reset sorting and filtering states on button click
Browse files Browse the repository at this point in the history
  • Loading branch information
jerem1508 committed Nov 25, 2024
1 parent 8e4ac92 commit 3684514
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions client/src/pages/openalex-ror/results/views-selector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,16 @@ export default function OpenalexView({
</ModalContent>
<ModalFooter style={{ display: 'flex', justifyContent: 'space-between' }}>
<Button
onClick={() => setSortsAndFilters({
sortOnNumberOfRors: 'default',
showAffiliations: 'all',
rorCountry: 'all',
})}
onClick={() => {
setSortsAndFilters({
sortOnNumberOfRors: 'default',
showAffiliations: 'all',
rorCountry: 'all',
});
setSelectSortOnNumberOfRors('default');
setSelectShowAffiliations('all');
setSelectRorCountry('all');
}}
>
Reset to default
</Button>
Expand Down

0 comments on commit 3684514

Please sign in to comment.