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 state for checkboxes #16943

Closed
simonhaenisch opened this issue Jan 3, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@simonhaenisch
Copy link
Contributor

commented Jan 3, 2019

Feature Request

Ionic version:

[x] 4.x

Describe the Feature Request

Implement an indeterminate state for the ion-checkbox component. We need this for a nested checkbox tree structure.

different checkbox states

Describe Preferred Solution

The easiest way is probably to add an indeterminate prop, because the indeterminate state is visual only and doesn't effect the actual value of the checkbox.

Related Code

@Component()
export class NestedCheckboxes {
  render = () => [
    <ion-checkbox indeterminate={true} />
    <ion-checkbox onClick={e => (e.target.indeterminate = true)} />
  ];
}

Additional Context

Article on CSS Tricks.

#11601 is the same (closed) request, just linking here for context.

I will try make a PR for this later today.

@ionitron-bot ionitron-bot bot added the triage label Jan 3, 2019

@simonhaenisch simonhaenisch changed the title indeterminate Indeterminate state for checkboxes Jan 3, 2019

simonhaenisch added a commit to simonhaenisch/ionic that referenced this issue Jan 3, 2019

feat(checkbox): implement indeterminate state
This adds an `indeterminate` prop to the `ion-checkbox` component,
which visually renders the checkbox with a dash to indicate an
indeterminate state.

Closes ionic-team#16943.
@brandyscarney

This comment has been minimized.

Copy link
Member

commented Mar 4, 2019

Released dev build 4.1.0-dev.201903041631.c641ae1 with this in it if you'd like to test it out in your app, thanks again for the PR!

@ionitron-bot

This comment has been minimized.

Copy link

commented Apr 3, 2019

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 3, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.