I have built a component in stackblitz
https://stackblitz.com/edit/react-sjktqaua?file=app%2Fapp.tsx,app%2Fgd-products.ts
Notably it has both the props needed for ctrl+c functionality:
data={data}
dataItemKey={DATA_ITEM_KEY}
select={select}
selectable={{
enabled: true,
mode: 'single',
cell: true,
drag: false,
}}
navigatable={true}
clipboard={true}
onClipboard={handleClipboard}
onSelectionChange={onSelectionChange}
and a row override:
const CustomRow = (props: GridCustomRowProps) => {
const available = !props.dataItem.Discontinued;
const noBgr = { backgroundColor: '' };
const customBgr = { backgroundColor: 'lavender', fontWeight: 'bold' };
return (
<tr {...props.trProps} style={available ? noBgr : customBgr}>
{props.children}
</tr>
);
};
rows={{ data: CustomRow }}
This breaks the ctrl+C event. It no longer fires when custom row is applied to the grid. Am I missing anything? I am passing trProps
also worth noting if you comment out the rows prop it does work again