Skip to content

Commit

Permalink
SCKAN-262: fix UI crash for button menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelpiano committed Feb 9, 2024
1 parent e83d240 commit bcbef91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/components/Widgets/CustomGroupedButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default function GroupedButtons({handleClick, selectedOption, options, se
aria-label="select merge strategy"
aria-haspopup="menu"
onClick={handleToggle}
disabled={options?.length > 0 ? false : true}
>
<ArrowDropDownIcon />
</Button>
Expand All @@ -65,7 +66,7 @@ export default function GroupedButtons({handleClick, selectedOption, options, se
<Paper sx={{p:3}}>
<ClickAwayListener onClickAway={handleClose}>
<MenuList id="split-button-menu" autoFocusItem>
{options.map((option: string, index: number) => (
{options?.map((option: string, index: number) => (
<MenuItem
key={option}
selected={index === selectedIndex}
Expand Down

0 comments on commit bcbef91

Please sign in to comment.