mantine-react-table icon indicating copy to clipboard operation
mantine-react-table copied to clipboard

Column pinning selection opacity issue

Open achennuru opened this issue 2 years ago • 6 comments

mantine-react-table version

1.2.0

react & react-dom versions

18.2.0

Describe the bug and the steps to reproduce it

When we pin the colums to left or right and there are columns behind with row selection enabled the opacity of hover and selected row will make it so that the text behind the pinned columns overlap.

image

Minimal, Reproducible Example - (Optional, but Recommended)

Attached the screenshot and the code is below.

` import { useState } from 'react'; import { MantineReactTable, useMantineReactTable } from 'mantine-react-table'; import { columns, data as initialData } from './makeData'; import { ActionIcon, Box } from '@mantine/core'; import { IconEdit, IconSend, IconTrash } from '@tabler/icons-react';

export const Example = () => { const [data, setData] = useState(initialData);

const table = useMantineReactTable({ columns, data, enableRowSelection: true, enableRowActions: true, enablePinning: true, renderRowActions: ({ row }) => ( <Box sx={{ display: 'flex', flexWrap: 'nowrap', gap: '8px' }}> <ActionIcon color="blue" onClick={() => window.open( mailto:[email protected]?subject=Hello ${row.original.firstName}! ) } > <IconSend /> </ActionIcon> <ActionIcon color="orange" onClick={() => { table.setEditingRow(row); }} > <IconEdit /> </ActionIcon> <ActionIcon color="red" onClick={() => { data.splice(row.index, 1); //assuming simple data table setData([...data]); }} > <IconTrash /> </ActionIcon> </Box> ), });

return <MantineReactTable table={table} />; };

export default Example;

`

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

None

Terms

  • [X] I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

achennuru avatar Aug 29 '23 05:08 achennuru

This also happens in V2, here's a video from the documentation website:

https://github.com/KevinVandy/mantine-react-table/assets/20308945/7b1dc6a1-12b6-44a7-9db4-334446f95496

I'm happy to help fix this if you can point what files should I check to debug it.

ddanielcruzz avatar Dec 21 '23 16:12 ddanielcruzz

This was fixed for V2 in #229 although it's not published. We will see about back porting this fix for V1.

alessandrojcm avatar Dec 21 '23 16:12 alessandrojcm

@alessandrojcm any info on porting the fix to V1 yet ? or can you suggest any temporary fix we could use on our side until the porting happens.

nairvishal avatar Jan 17 '24 18:01 nairvishal

@nairvishal I can take a look into this later today.

alessandrojcm avatar Jan 18 '24 09:01 alessandrojcm

#247

alessandrojcm avatar Jan 18 '24 11:01 alessandrojcm