Skip to content

fix(checkbox/datatable): fixed checkbox checked state regression #20070

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

maradwan26
Copy link
Contributor

@maradwan26 maradwan26 commented Jul 31, 2025

Closes #19563
Closes #19820
Closes #20058

There was a regression problem with the checkbox component's checked state not updating properly in many use cases, including the selection feature in data-table. This PR fixes this issue.

Changelog

Added

  • Added .checked="${checked}" to the rendering of checkbox.ts since the ? would only conditionally render the checked attribute which was the cause of this issue.

Testing / Reviewing

  • Go to DataTable/Selection/Default in the WC deploy preview
  • Selections and Select All should work properly
  • Go to DataTable/Batch Actions/Default in the WC deploy preview
  • Selections and Select All should work properly
  • There should no regression.

PR Checklist

As the author of this PR, before marking ready for review, confirm you:

  • Reviewed every line of the diff
  • [ ] Updated documentation and storybook examples
  • [ ] Wrote passing tests that cover this change
  • Addressed any impact on accessibility (a11y)
  • Tested for cross-browser consistency
  • Validated that this code is ready for review and status checks should pass

More details can be found in the pull request guide

Copy link

netlify bot commented Jul 31, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 92cac4a
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/688b8f4e314e390008aa44ba
😎 Deploy Preview https://deploy-preview-20070--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Jul 31, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 92cac4a
🔍 Latest deploy log https://app.netlify.com/projects/carbon-elements/deploys/688b8f4e63d82f0008f1a045
😎 Deploy Preview https://deploy-preview-20070--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Jul 31, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 92cac4a
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/688b8f4e3539a100083d6098
😎 Deploy Preview https://deploy-preview-20070--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@maradwan26 maradwan26 marked this pull request as draft July 31, 2025 15:32
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.39%. Comparing base (b56c1b8) to head (92cac4a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #20070   +/-   ##
=======================================
  Coverage   91.39%   91.39%           
=======================================
  Files         485      485           
  Lines       31370    31373    +3     
  Branches     5480     5430   -50     
=======================================
+ Hits        28670    28673    +3     
- Misses       2546     2547    +1     
+ Partials      154      153    -1     
Flag Coverage Δ
main-packages 84.93% <ø> (ø)
web-components 97.16% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants