Fix/record group index and seed (#9605)

- [x] [Disable group by on default view Options
menu](https://discord.com/channels/1130383047699738754/1328421803399446568)
- [x] Add default seed for view group
This commit is contained in:
Jérémy M
2025-01-15 09:37:15 +01:00
committed by GitHub
parent 1a5b3ef2f8
commit eaa68424f5
12 changed files with 393 additions and 143 deletions

View File

@ -30,6 +30,7 @@ export type MenuItemProps = {
onMouseEnter?: (event: MouseEvent<HTMLDivElement>) => void;
onMouseLeave?: (event: MouseEvent<HTMLDivElement>) => void;
testId?: string;
disabled?: boolean;
text: ReactNode;
contextualText?: ReactNode;
hasSubMenu?: boolean;
@ -49,6 +50,7 @@ export const MenuItem = ({
text,
contextualText,
hasSubMenu = false,
disabled = false,
}: MenuItemProps) => {
const theme = useTheme();
const showIconButtons = Array.isArray(iconButtons) && iconButtons.length > 0;
@ -64,7 +66,8 @@ export const MenuItem = ({
return (
<StyledHoverableMenuItemBase
data-testid={testId ?? undefined}
onClick={handleMenuItemClick}
onClick={disabled ? undefined : handleMenuItemClick}
disabled={disabled}
className={className}
accent={accent}
isIconDisplayedOnHoverOnly={isIconDisplayedOnHoverOnly}

View File

@ -100,6 +100,11 @@ export const Catalog: CatalogStory<Story, typeof MenuItem> = {
}
},
},
{
name: 'disabled',
values: [true, false],
props: (disabled: boolean) => ({ disabled }),
},
],
options: {
elementContainer: {