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

getIsSomeRowsSelected returns false when all rows selected

Open kadirgun opened this issue 1 year ago • 1 comments

mantine-react-table version

2.0.0-beta.6

react & react-dom versions

18.3.1

Describe the bug and the steps to reproduce it

getIsSomeRowsSelected returns false if all rows are selected.

Minimal, Reproducible Example - (Optional, but Recommended)

renderTopToolbarCustomActions: ({ table }) => {
      const handleOpenTerminal = () => {
        console.log(table.getIsSomeRowsSelected());
        console.log(table.getIsAllRowsSelected());
      };

      return (
        <Group>
          <ActionIcon onClick={handleOpenTerminal}>
            <IconTerminal size={16} />
          </ActionIcon>
        </Group>
      );
    }

Select all rows and click on the button.

getIsSomeRowsSelected false
getIsAllRowsSelected true

If all rows are selected, getIsSomeRowsSelected must still be true.

Screenshots or Videos (Optional)

No response

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

Maybe, I'll investigate and start debugging

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.

kadirgun avatar Sep 18 '24 02:09 kadirgun

This is a bug with TanStack Table https://github.com/TanStack/table/issues/5740

alessandrojcm avatar Nov 04 '24 17:11 alessandrojcm