Skip to content

Commit

Permalink
Adjust styling of pills and conditional logic of combobox options
Browse files Browse the repository at this point in the history
  • Loading branch information
samau3 committed Sep 13, 2024
1 parent a60a0c8 commit 39dc663
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/src/pages/patients/inputs/MedicalDataSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ export default function MedicalDataSearch({
<Pill
key={item?.id}
withRemoveButton
radius="md"
size="md"
onRemove={() => handleValueRemove(item?.id)}
>
{item?.name}
Expand Down Expand Up @@ -139,7 +141,7 @@ export default function MedicalDataSearch({
return <Combobox.Empty>Start typing to search</Combobox.Empty>;
}

if (options.length === 0 && search.length !== 0) {
if (options.length === 0) {
return <Combobox.Empty>All options selected</Combobox.Empty>;
}

Expand All @@ -164,7 +166,7 @@ export default function MedicalDataSearch({
handleSearch={setSearch}
handleKeyDown={handleKeyDown}
>
<Pill.Group style={{ marginTop: '2px' }}>{values}</Pill.Group>
<Pill.Group style={{ marginTop: '6px' }}>{values}</Pill.Group>
</SearchDatabaseInputField>
);
}
Expand Down

0 comments on commit 39dc663

Please sign in to comment.