Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCKAN-262: fix UI crash for button menu #219

Merged
merged 3 commits into from
Feb 12, 2024
Merged

Conversation

ddelpiano
Copy link
Member

No description provided.

Salam-Dalloul
Salam-Dalloul previously approved these changes Feb 9, 2024
@@ -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}
Copy link
Contributor

@Salam-Dalloul Salam-Dalloul Feb 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @ddelpiano i only have one suggestion here to make the button looks better, for now it looks like this
Screenshot 2024-02-09 at 2 54 16 PM

if we just make an edit for the options passed value to have an initial value as an empty array if it's undefined in here
export default function GroupedButtons({handleClick, selectedOption, options = [], selectedIndex, handleMenuItemClick , hasFormat = false, format, isDisabled}: any) {

and then add the disabled state for ButtonGroup not the Arrow button

<ButtonGroup variant="contained" ref={anchorRef} disabled={options.length === 0 || isDisabled}>

then the button when looks like this
Screenshot 2024-02-09 at 2 55 00 PM

@Salam-Dalloul Salam-Dalloul self-requested a review February 9, 2024 14:02
Copy link
Contributor

@zsinnema zsinnema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@zsinnema zsinnema merged commit 1c30ee2 into develop Feb 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants