import { type MouseEvent } from 'react'; import { ActionIcon, type ActionIconProps, Menu, Tooltip } from '@mantine/core'; import { type MRT_Row, type MRT_RowData, type MRT_TableInstance, } from '../../types'; interface Props extends ActionIconProps { handleEdit: (event: MouseEvent) => void; row: MRT_Row; table: MRT_TableInstance; } export const MRT_RowActionMenu = ({ handleEdit, row, table, ...rest }: Props) => { 'use no memo'; const { options: { editDisplayMode, enableEditing, icons: { IconDots, IconEdit }, localization, positionActionsColumn, renderRowActionMenuItems, }, } = table; return ( event.stopPropagation()} size="sm" variant="subtle" {...rest} > event.stopPropagation()}> {enableEditing && editDisplayMode !== 'table' && ( } onClick={handleEdit}> {localization.edit} )} {renderRowActionMenuItems?.({ row, table, })} ); };