Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Conflict between BatchAction and Filter(Popover) in TableToolbarContent of DataTable #17549

Open
2 tasks done
james-liubang opened this issue Sep 23, 2024 · 0 comments
Open
2 tasks done

Comments

@james-liubang
Copy link

Package

@carbon/react

Browser

Chrome

Package version

v10

React version

v21.6.2

Description

Problem:
There was a conflict between BatchAction and Filter(Popover) in TableToolbarContent of DataTable.

Filter(Popover) worked well before added TableBatchAction.

image

It couldn't show Filter(Popover) after added TableBatchAction.

<TableBatchAction
tabIndex={hasBatchActions ? 0 : -1}
renderIcon={Delete}
onClick={handleDeleteRows}
>
Delete

{BatchToolbar}

image

Solution:
The clipPath set none when no selection, it works. Thanks for Jose @jose-biescas , he gave the solution, very very smart solution..

    <TableToolbarContent
      style={{
        clipPath:
          BatchToolbar && selectedRowsCountInFiltered > 0
            ? "polygon(0 0, 100% 0, 100% 0, 0 0)"
            : "none",
      }}
      aria-hidden={hasBatchActions}
    >...
    </TableToolbarContent>
    
 However please resolve this in future release , thanks!!!

Reproduction/example

https://stackblitz.com/edit/github-cygrgo?file=src%2FApp.jsx

Steps to reproduce

  1. Implement the DataTable with Filter
    it worked.
  2. Add BatchAction
    it failed

Suggested Severity

None

Application/PAL

No response

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants