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

[Question]: Datatable - TableBatchActions auto cancel/deselect after customer batch action #9693

Closed
1 task done
BoykaZhu opened this issue Sep 17, 2021 · 1 comment
Closed
1 task done

Comments

@BoykaZhu
Copy link

Question for Carbon

Hi,

I do have the custom-defined TableBatchAction in TableBatchActions.
Now after I complete my own TableBatchAction, I could see the selectedRows are still there.
How to make sure those selectedRow be deselected automatically?
Or in other words, is there any way to trigger the "Cancel" smartly?

Thanks
Boyka

Code of Conduct

@BoykaZhu
Copy link
Author

I finally found below works for me.
onClick={(e) => { personalTaskHandler(e, selectedRows); getBatchActionProps().onCancel()}}

kennylam pushed a commit to kennylam/carbon that referenced this issue Jul 30, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [react](https://reactjs.org/) ([source](https://github.com/facebook/react)) | [`16.9.0` -> `16.14.0`](https://renovatebot.com/diffs/npm/react/16.9.0/16.14.0) | [![age](https://badges.renovateapi.com/packages/npm/react/16.14.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/react/16.14.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/react/16.14.0/compatibility-slim/16.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/react/16.14.0/confidence-slim/16.9.0)](https://docs.renovatebot.com/merge-confidence/) |
| [react-dom](https://reactjs.org/) ([source](https://github.com/facebook/react)) | [`16.9.0` -> `16.14.0`](https://renovatebot.com/diffs/npm/react-dom/16.9.0/16.14.0) | [![age](https://badges.renovateapi.com/packages/npm/react-dom/16.14.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/react-dom/16.14.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/react-dom/16.14.0/compatibility-slim/16.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/react-dom/16.14.0/confidence-slim/16.9.0)](https://docs.renovatebot.com/merge-confidence/) |
| [react-is](https://reactjs.org/) ([source](https://github.com/facebook/react)) | [`16.9.0` -> `16.13.1`](https://renovatebot.com/diffs/npm/react-is/16.9.0/16.13.1) | [![age](https://badges.renovateapi.com/packages/npm/react-is/16.13.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/react-is/16.13.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/react-is/16.13.1/compatibility-slim/16.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/react-is/16.13.1/confidence-slim/16.9.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>facebook/react</summary>

### [`v16.14.0`](https://github.com/facebook/react/blob/HEAD/CHANGELOG.md#&#8203;16140-October-14-2020)

[Compare Source](https://github.com/facebook/react/compare/v16.13.1...v16.14.0)

##### React

-   Add support for the [new JSX transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html). ([@&carbon-design-system#8203;lunaruan](https://github.com/lunaruan) in [#&carbon-design-system#8203;18299](https://github.com/facebook/react/pull/18299))

### [`v16.13.1`](https://github.com/facebook/react/blob/HEAD/CHANGELOG.md#&#8203;16131-March-19-2020)

[Compare Source](https://github.com/facebook/react/compare/v16.13.0...v16.13.1)

##### React DOM

-   Fix bug in legacy mode Suspense where effect clean-up functions are not fired. This only affects users who use Suspense for data fetching in legacy mode, which is not technically supported. ([@&carbon-design-system#8203;acdlite](https://github.com/acdlite) in [#&carbon-design-system#8203;18238](https://github.com/facebook/react/pull/18238))
-   Revert warning for cross-component updates that happen inside class render lifecycles (`componentWillReceiveProps`, `shouldComponentUpdate`, and so on). ([@&carbon-design-system#8203;gaearon](https://github.com/gaearon) in [#&carbon-design-system#8203;18330](https://github.com/facebook/react/pull/18330))

### [`v16.13.0`](https://github.com/facebook/react/blob/HEAD/CHANGELOG.md#&#8203;16130-February-26-2020)

[Compare Source](https://github.com/facebook/react/compare/v16.12.0...v16.13.0)

##### React

-   Warn when a string ref is used in a manner that's not amenable to a future codemod ([@&carbon-design-system#8203;lunaruan](https://github.com/lunaruan) in [#&carbon-design-system#8203;17864](https://github.com/facebook/react/pull/17864))
-   Deprecate `React.createFactory()` ([@&carbon-design-system#8203;trueadm](https://github.com/trueadm) in [#&carbon-design-system#8203;17878](https://github.com/facebook/react/pull/17878))

##### React DOM

-   Warn when changes in `style` may cause an unexpected collision ([@&carbon-design-system#8203;sophiebits](https://github.com/sophiebits) in [#&carbon-design-system#8203;14181](https://github.com/facebook/react/pull/14181), [#&carbon-design-system#8203;18002](https://github.com/facebook/react/pull/18002))
-   Warn when a function component is updated during another component's render phase ([@&carbon-design-system#8203;acdlite](https://github.com/acdlite) in [#&carbon-design-system#8203;17099](https://github.com/facebook/react/pull/17099))
-   Deprecate `unstable_createPortal` ([@&carbon-design-system#8203;trueadm](https://github.com/trueadm) in [#&carbon-design-system#8203;17880](https://github.com/facebook/react/pull/17880))
-   Fix `onMouseEnter` being fired on disabled buttons ([@&carbon-design-system#8203;AlfredoGJ](https://github.com/AlfredoGJ) in [#&carbon-design-system#8203;17675](https://github.com/facebook/react/pull/17675))
-   Call `shouldComponentUpdate` twice when developing in `StrictMode` ([@&carbon-design-system#8203;bvaughn](https://github.com/bvaughn) in [#&carbon-design-system#8203;17942](https://github.com/facebook/react/pull/17942))
-   Add `version` property to ReactDOM ([@&carbon-design-system#8203;ealush](https://github.com/ealush) in [#&carbon-design-system#8203;15780](https://github.com/facebook/react/pull/15780))
-   Don't call `toString()` of `dangerouslySetInnerHTML` ([@&carbon-design-system#8203;sebmarkbage](https://github.com/sebmarkbage) in [#&carbon-design-system#8203;17773](https://github.com/facebook/react/pull/17773))
-   Show component stacks in more warnings ([@&carbon-design-system#8203;gaearon](https://github.com/gaearon) in [#&carbon-design-system#8203;17922](https://github.com/facebook/react/pull/17922), [#&carbon-design-system#8203;17586](https://github.com/facebook/react/pull/17586))

##### Concurrent Mode (Experimental)

-   Warn for problematic usages of `ReactDOM.createRoot()` ([@&carbon-design-system#8203;trueadm](https://github.com/trueadm) in [#&carbon-design-system#8203;17937](https://github.com/facebook/react/pull/17937))
-   Remove `ReactDOM.createRoot()` callback params and added warnings on usage ([@&carbon-design-system#8203;bvaughn](https://github.com/bvaughn) in [#&carbon-design-system#8203;17916](https://github.com/facebook/react/pull/17916))
-   Don't group Idle/Offscreen work with other work ([@&carbon-design-system#8203;sebmarkbage](https://github.com/sebmarkbage) in [#&carbon-design-system#8203;17456](https://github.com/facebook/react/pull/17456))
-   Adjust `SuspenseList` CPU bound heuristic ([@&carbon-design-system#8203;sebmarkbage](https://github.com/sebmarkbage) in [#&carbon-design-system#8203;17455](https://github.com/facebook/react/pull/17455))
-   Add missing event plugin priorities ([@&carbon-design-system#8203;trueadm](https://github.com/trueadm) in [#&carbon-design-system#8203;17914](https://github.com/facebook/react/pull/17914))
-   Fix `isPending` only being true when transitioning from inside an input event ([@&carbon-design-system#8203;acdlite](https://github.com/acdlite) in [#&carbon-design-system#8203;17382](https://github.com/facebook/react/pull/17382))
-   Fix `React.memo` components dropping updates when interrupted by a higher priority update ([@&carbon-design-system#8203;acdlite](\(https://github.com/acdlite\)) in [#&carbon-design-system#8203;18091](https://github.com/facebook/react/pull/18091))
-   Don't warn when suspending at the wrong priority ([@&carbon-design-system#8203;gaearon](https://github.com/gaearon) in [#&carbon-design-system#8203;17971](https://github.com/facebook/react/pull/17971))
-   Fix a bug with rebasing updates ([@&carbon-design-system#8203;acdlite](https://github.com/acdlite) and [@&carbon-design-system#8203;sebmarkbage](https://github.com/sebmarkbage) in [#&carbon-design-system#8203;17560](https://github.com/facebook/react/pull/17560), [#&carbon-design-system#8203;17510](https://github.com/facebook/react/pull/17510), [#&carbon-design-system#8203;17483](https://github.com/facebook/react/pull/17483), [#&carbon-design-system#8203;17480](https://github.com/facebook/react/pull/17480))

### [`v16.12.0`](https://github.com/facebook/react/blob/HEAD/CHANGELOG.md#&#8203;16120-November-14-2019)

[Compare Source](https://github.com/facebook/react/compare/v16.11.0...v16.12.0)

##### React DOM

-   Fix passive effects (`useEffect`) not being fired in a multi-root app. ([@&carbon-design-system#8203;acdlite](https://github.com/acdlite) in [#&carbon-design-system#8203;17347](https://github.com/facebook/react/pull/17347))

##### React Is

-   Fix `lazy` and `memo` types considered elements instead of components ([@&carbon-design-system#8203;bvaughn](https://github.com/bvaughn) in [#&carbon-design-system#8203;17278](https://github.com/facebook/react/pull/17278))

### [`v16.11.0`](https://github.com/facebook/react/blob/HEAD/CHANGELOG.md#&#8203;16110-October-22-2019)

[Compare Source](https://github.com/facebook/react/compare/v16.10.2...v16.11.0)

##### React DOM

-   Fix `mouseenter` handlers from firing twice inside nested React containers. [@&carbon-design-system#8203;yuanoook](https://github.com/yuanoook) in [#&carbon-design-system#8203;16928](https://github.com/facebook/react/pull/16928)
-   Remove `unstable_createRoot` and `unstable_createSyncRoot` experimental APIs. (These are available in the Experimental channel as `createRoot` and `createSyncRoot`.) ([@&carbon-design-system#8203;acdlite](http://github.com/acdlite) in [#&carbon-design-system#8203;17088](https://github.com/facebook/react/pull/17088))

### [`v16.10.2`](https://github.com/facebook/react/blob/HEAD/CHANGELOG.md#&#8203;16102-October-3-2019)

[Compare Source](https://github.com/facebook/react/compare/v16.10.1...v16.10.2)

##### React DOM

-   Fix regression in react-native-web by restoring order of arguments in event plugin extractors ([@&carbon-design-system#8203;necolas](https://github.com/necolas) in [#&carbon-design-system#8203;16978](https://github.com/facebook/react/pull/16978))

### [`v16.10.1`](https://github.com/facebook/react/blob/HEAD/CHANGELOG.md#&#8203;16101-September-28-2019)

[Compare Source](https://github.com/facebook/react/compare/v16.10.0...v16.10.1)

##### React DOM

-   Fix regression in Next.js apps by allowing Suspense mismatch during hydration to silently proceed ([@&carbon-design-system#8203;sebmarkbage](https://github.com/sebmarkbage) in [#&carbon-design-system#8203;16943](https://github.com/facebook/react/pull/16943))

### [`v16.10.0`](https://github.com/facebook/react/blob/HEAD/CHANGELOG.md#&#8203;16100-September-27-2019)

[Compare Source](https://github.com/facebook/react/compare/v16.9.0...v16.10.0)

##### React DOM

-   Fix edge case where a hook update wasn't being memoized. ([@&carbon-design-system#8203;sebmarkbage](http://github.com/sebmarkbage) in [#&carbon-design-system#8203;16359](https://github.com/facebook/react/pull/16359))
-   Fix heuristic for determining when to hydrate, so we don't incorrectly hydrate during an update. ([@&carbon-design-system#8203;sebmarkbage](http://github.com/sebmarkbage) in [#&carbon-design-system#8203;16739](https://github.com/facebook/react/pull/16739))
-   Clear additional fiber fields during unmount to save memory. ([@&carbon-design-system#8203;trueadm](http://github.com/trueadm) in [#&carbon-design-system#8203;16807](https://github.com/facebook/react/pull/16807))
-   Fix bug with required text fields in Firefox. ([@&carbon-design-system#8203;halvves](http://github.com/halvves) in [#&carbon-design-system#8203;16578](https://github.com/facebook/react/pull/16578))
-   Prefer `Object.is` instead of inline polyfill, when available. ([@&carbon-design-system#8203;ku8ar](http://github.com/ku8ar) in [#&carbon-design-system#8203;16212](https://github.com/facebook/react/pull/16212))
-   Fix bug when mixing Suspense and error handling. ([@&carbon-design-system#8203;acdlite](http://github.com/acdlite) in [#&carbon-design-system#8203;16801](https://github.com/facebook/react/pull/16801))

##### Scheduler (Experimental)

-   Improve queue performance by switching its internal data structure to a min binary heap. ([@&carbon-design-system#8203;acdlite](http://github.com/acdlite) in [#&carbon-design-system#8203;16245](https://github.com/facebook/react/pull/16245))
-   Use `postMessage` loop with short intervals instead of attempting to align to frame boundaries with `requestAnimationFrame`. ([@&carbon-design-system#8203;acdlite](http://github.com/acdlite) in [#&carbon-design-system#8203;16214](https://github.com/facebook/react/pull/16214))

##### useSubscription

-   Avoid tearing issue when a mutation happens and the previous update is still in progress. ([@&carbon-design-system#8203;bvaughn](http://github.com/bvaughn) in [#&carbon-design-system#8203;16623](https://github.com/facebook/react/pull/16623))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/carbon-design-system/carbon-for-ibm-dotcom).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4zNC4xIiwidXBkYXRlZEluVmVyIjoiMzQuMzQuMSJ9-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant