-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Amy Chen
committed
Jan 7, 2025
1 parent
6488ea3
commit 83b2600
Showing
13 changed files
with
816 additions
and
837 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 14 additions & 8 deletions
22
patientsearch/src/js/components/patientList/DropdownMenu.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
import Dropdown from "../Dropdown"; | ||
import { usePatientListContext } from "../../context/PatientListContextProvider"; | ||
|
||
export default function DropdownMenu() { | ||
export default function DropdownMenu(props) { | ||
let { | ||
anchorEl, | ||
// anchorEl, | ||
currentRow, | ||
getMenuItems = function () { | ||
return null; | ||
}, | ||
handleMenuClose = function () {}, | ||
handleMenuSelect = function () {}, | ||
} = usePatientListContext(); | ||
if (!props.anchorEl) return null; | ||
return ( | ||
<Dropdown | ||
anchorEl={anchorEl} | ||
handleMenuClose={handleMenuClose} | ||
handleMenuSelect={handleMenuSelect} | ||
menuItems={getMenuItems()} | ||
></Dropdown> | ||
( | ||
<Dropdown | ||
anchorEl={props.anchorEl} | ||
open={props.data.id === currentRow?.id} | ||
handleMenuClose={handleMenuClose} | ||
handleMenuSelect={handleMenuSelect} | ||
menuItems={getMenuItems()} | ||
{...props} | ||
></Dropdown> | ||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.