Skip to content

Commit

Permalink
resolved skipping scroll issue, now open by default, fits atleast thr…
Browse files Browse the repository at this point in the history
…ee results as requested
  • Loading branch information
ruizajtruss committed Mar 15, 2024
1 parent 41b65af commit 8b2bb6d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions services/app-web/src/pages/LinkYourRates/LinkRateSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export const LinkRateSelect = ({
value: revision.id,
label: (
<>
<h4>{revision.formData.rateCertificationName}</h4>
<div style={{ lineHeight: '50%' }}>
<strong>{revision.formData.rateCertificationName}</strong>
<div style={{ lineHeight: '50%', fontSize: '14px' }}>
<p>
Programs:&nbsp;
{programNames(
Expand Down Expand Up @@ -106,15 +106,23 @@ export const LinkRateSelect = ({
}
}

//Need this to make the label searchable since it's buried in a react element
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const filterOptions = ({ label }: any, input: string) =>
label.props.children[0].props.children
?.toLowerCase()
.includes(input.toLowerCase())

return (
<>
<Select
defaultMenuIsOpen
value={defaultValues}
className={styles.multiSelect}
options={error || loading ? undefined : rateNames}
isSearchable
isMulti
maxMenuHeight={169}
maxMenuHeight={405}
aria-label="linked rates (required)"
ariaLiveMessages={{
onFocus,
Expand All @@ -135,6 +143,7 @@ export const LinkRateSelect = ({
)
)
}
filterOption={filterOptions}
{...selectProps}
/>
</>
Expand Down

0 comments on commit 8b2bb6d

Please sign in to comment.