Skip to content

Commit

Permalink
feat(openalex): Set "Clear search" button as disabled if no search
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Dec 4, 2024
1 parent 7536df7 commit d1279ca
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions client/src/pages/openalex-affiliations/results/list-view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,18 @@ export default function ListView({
}}
value={filteredAffiliationName}
/>
<Button
<button
aria-label="Clear search"
className=" fr-ml-1w "
className=" fr-ml-1w"
disabled={!filteredAffiliationName.length}
icon="delete-line"
onClick={() => setFilteredAffiliationName('')}
size="sm"
title="Clear search"
variant="text"
/>
type="button"
>
<i className="ri-delete-bin-6-line" />
</button>
</Col>
<Col xs="2" className="text-right">
<Button
Expand Down

0 comments on commit d1279ca

Please sign in to comment.