From dcb1fa21441cb292fd66253a97b083e5d47604e5 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 31 Jan 2023 07:38:18 -0800 Subject: Add report scheduling --- modern/src/common/components/SplitButton.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'modern/src/common/components/SplitButton.js') diff --git a/modern/src/common/components/SplitButton.js b/modern/src/common/components/SplitButton.js index bdf12870..114370c7 100644 --- a/modern/src/common/components/SplitButton.js +++ b/modern/src/common/components/SplitButton.js @@ -1,16 +1,17 @@ import React, { useRef, useState } from 'react'; -import { Button, ButtonGroup, Menu, MenuItem, Typography } from '@mui/material'; +import { + Button, ButtonGroup, Menu, MenuItem, Typography, +} from '@mui/material'; import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown'; -const SplitButton = ({ fullWidth, variant, color, disabled, onClick, options }) => { +const SplitButton = ({ fullWidth, variant, color, disabled, onClick, options, selected, setSelected }) => { const anchorRef = useRef(); const [menuAnchorEl, setMenuAnchorEl] = useState(null); - const [selected, setSelected] = useState(Object.keys(options)[0]); return ( <> - -