Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

<md-checkbox> indeterminate state cannot be applied after the element is attached #561

Open
SvetlozarValchev opened this issue Mar 23, 2020 · 0 comments

Comments

@SvetlozarValchev
Copy link

SvetlozarValchev commented Mar 23, 2020

It seems that the checkbox's indeterminate state (which corresponds to value=null) is not available once the element is attached. You can initially set it to indeterminate, but you cannot set to indeterminate state with value changes.
From the code here, you can see that the value is checked only on attached, and it cannot be set to indeterminate on subsequent value changes:

if (this.checked === null) {
this.checkbox.indeterminate = true;
} else {
this.checkbox.indeterminate = false;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant