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

Indeterminate Checkbox #1083

Merged
merged 4 commits into from
Feb 4, 2025
Merged

Indeterminate Checkbox #1083

merged 4 commits into from
Feb 4, 2025

Conversation

steveblue
Copy link
Contributor

@steveblue steveblue commented Feb 3, 2025

Summary

This PR introduces an indeterminate state for ngx-checkbox, mirroring the native browser behavior of input[type="checkbox"] when put in the same indeterminate state.

In summary, a checkbox should be able to display indeterminate regardless of value. indeterminate should not set value (or checked), but it should override the look and feel. indeterminate should only be set externally and any form handling should account for special cases involving indeterminate.

  • Enhancement (ngx-checkbox): a new look is available that displays the indeterminate state.
  • Enhancement (ngx-checkbox): new @Input named indeterminate set to a boolean.
  • Enhancement (ngx-checkbox): implements an EventEmitter when indeterminate changes.
  • Fix (ngx-checkbox): position of check mark when checked set to true.
indeterminate.checkbox.mov

Checklist

  • *Added unit tests
  • *Added a code reviewer
  • Added changes to /projects/swimlane/ngx-ui/CHANGELOG.md under HEAD (Unreleased)
  • Updated the demo page
  • Included screenshots of visual changes

*required

background-color: colors.$color-blue-400;
border-radius: 2px;
opacity: 1;
border: 2px solid colors.$color-blue-400;
transform: rotate(0deg) scale(1);

&:after {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This :after is missing the content property.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It inherits content from above.

@steveblue steveblue merged commit 4ba9788 into angular-19 Feb 4, 2025
1 check passed
@steveblue steveblue deleted the checkbox-indeterminate branch February 4, 2025 02:35
steveblue added a commit that referenced this pull request Feb 11, 2025
* feat: angular 19
* feat: angular cdk upgrade
* fix: sass refactor
* fix: update peer dependencies
* fix: CHANGELOG
* feat: rename color files for consistency
* feat: new color files
* feat: version bump
* feat: Indeterminate Checkbox  (#1083)
* fix:  position of check mark when checked set to true
* fix: upgrade ng2-file-upload
* feat: migrate to yarn
* fix: moment issues
* fix: ngx-time
* fix: format and lint
* fix: tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants