Skip to content

Commit

Permalink
Always expand beneficiary search when query is present
Browse files Browse the repository at this point in the history
  • Loading branch information
katamartin committed Jan 9, 2025
1 parent 0279cc3 commit 2ce35d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/beneficiary-heading.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const BeneficiaryHeading = ({ sx, color }) => {
<IconWrapper
sx={sx}
buttonBehavior
initiallyExpanded={!!beneficiarySearch}
Icon={SearchCircle}
color={color}
onClose={() => setValue('')}
Expand Down
3 changes: 2 additions & 1 deletion components/icon-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ const IconWrapper = ({
Icon,
content,
onClose,
initiallyExpanded = false,
buttonBehavior = false,
color = 'primary',
mt = '8px',
sx,
}) => {
const [expanded, setExpanded] = useState(false)
const [expanded, setExpanded] = useState(initiallyExpanded)

const handleToggleExpanded = useCallback(() => {
if (expanded && onClose) {
Expand Down

0 comments on commit 2ce35d8

Please sign in to comment.