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

[Feature Request]: Need a way to clear the selection of rows upon performing Batch action. #14412

Closed
1 task done
k02pradeep opened this issue Aug 9, 2023 · 1 comment
Closed
1 task done
Labels
proposal: open This request has gone through triaging. We're determining whether we take this on or not. status: waiting for author's response 💬 type: enhancement 💡

Comments

@k02pradeep
Copy link

The problem

Need a way to clear the selection of rows upon performing Batch action.

The solution

Datatable should expose ways to clear the selection programmatically from the parent component.

Examples

No response

Application/PAL

No response

Business priority

None

Available extra resources

No response

Code of Conduct

@tay1orjones
Copy link
Member

@k02pradeep The default functionality for onCancel deselects all rows already, see here

https://github.com/carbon-design-system/carbon/blame/fa9c18c6bc77f27096e1b9fc4a5f1ed4c8573f0f/packages/react/src/components/DataTable/DataTable.tsx#L787-L798

Does this not work for you? If you're implementing your own onCancel functionality, there is an option to call the selectAll() function returned from the render as described here for programatic selection. This should toggle the selection of all rows.

@tay1orjones tay1orjones added the proposal: open This request has gone through triaging. We're determining whether we take this on or not. label Oct 16, 2023
@github-project-automation github-project-automation bot moved this to Triage in Roadmap Oct 16, 2023
@sstrubberg sstrubberg closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2023
@github-project-automation github-project-automation bot moved this from Triage to Completed in Roadmap Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal: open This request has gone through triaging. We're determining whether we take this on or not. status: waiting for author's response 💬 type: enhancement 💡
Projects
Archived in project
Development

No branches or pull requests

3 participants