Skip to content

Commit

Permalink
wrap column menu button with a tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
cherniavskii committed Apr 4, 2023
1 parent a24a167 commit 81ffbb9
Showing 1 changed file with 19 additions and 14 deletions.
Expand Up @@ -47,22 +47,27 @@ export const ColumnHeaderMenuIcon = React.memo((props: ColumnHeaderMenuIconProps

return (
<div className={classes.root}>
<rootProps.slots.baseIconButton
ref={iconButtonRef}
tabIndex={-1}
className={classes.button}
aria-label={apiRef.current.getLocaleText('columnMenuLabel')}
<rootProps.slots.baseTooltip
title={apiRef.current.getLocaleText('columnMenuLabel')}
size="small"
onClick={handleMenuIconClick}
aria-expanded={open ? 'true' : undefined}
aria-haspopup="true"
aria-controls={columnMenuId}
id={columnMenuButtonId}
{...rootProps.slotProps?.baseIconButton}
enterDelay={1000}
{...rootProps.slotProps?.baseTooltip}
>
<rootProps.slots.columnMenuIcon fontSize="small" />
</rootProps.slots.baseIconButton>
<rootProps.slots.baseIconButton
ref={iconButtonRef}
tabIndex={-1}
className={classes.button}
aria-label={apiRef.current.getLocaleText('columnMenuLabel')}
size="small"
onClick={handleMenuIconClick}
aria-expanded={open ? 'true' : undefined}
aria-haspopup="true"
aria-controls={columnMenuId}
id={columnMenuButtonId}
{...rootProps.slotProps?.baseIconButton}
>
<rootProps.slots.columnMenuIcon fontSize="small" />
</rootProps.slots.baseIconButton>
</rootProps.slots.baseTooltip>
</div>
);
});

0 comments on commit 81ffbb9

Please sign in to comment.