Skip to content

Commit

Permalink
Merge branch 'v7.x' into cherry-pick-15850
Browse files Browse the repository at this point in the history
  • Loading branch information
KenanYusuf authored Dec 13, 2024
2 parents 764f749 + c668591 commit a336c53
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/x-data-grid/src/components/cell/GridActionsCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ function GridActionsCell(props: GridActionsCellProps) {
const hideMenu = () => {
setOpen(false);
};
const toggleMenu = () => {
if (open) {
hideMenu();
} else {
showMenu();
}
};

const handleTouchRippleRef =
(index: string | number) => (instance: TouchRippleActions | null) => {
Expand Down Expand Up @@ -213,7 +220,7 @@ function GridActionsCell(props: GridActionsCellProps) {
aria-controls={open ? menuId : undefined}
role="menuitem"
size="small"
onClick={showMenu}
onClick={toggleMenu}
touchRippleRef={handleTouchRippleRef(buttonId)}
tabIndex={focusedButtonIndex === iconButtons.length ? tabIndex : -1}
{...rootProps.slotProps?.baseIconButton}
Expand Down

0 comments on commit a336c53

Please sign in to comment.