Skip to content

Indeterminate state for checkboxes #16943

Closed

Description

@simonhaenisch

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.

Activity

  1. changed the title [-]indeterminate[/-] [+]Indeterminate state for checkboxes[/+] on Jan 3, 2019
  2. added
    type: feature request
    package: core
    and removed on Jan 3, 2019
  3. brandyscarney commented on Mar 4, 2019

    @brandyscarney
    Member

    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!

  4. ionitron-bot commented on Apr 3, 2019

    @ionitron-bot

    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.

  5. locked and limited conversation to collaborators on Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: coretype: feature request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions