-
-
Notifications
You must be signed in to change notification settings - Fork 378
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When Indeterminate="true" is set on a MatCheckbox, setting the value from code does not alter the visible state of the checkbox (it works fine when Indeterminate is false).
To Reproduce
<MatBlazor.MatCheckbox Indeterminate="true" Value="Value">Current value: @(Value == null ? "null" : Value.Value.ToString())</MatBlazor.MatCheckbox>
<MatBlazor.MatButton Label="Set to true" OnClick="() => Value = true" />
<MatBlazor.MatButton Label="Set to null" OnClick="() => Value = null" />
<MatBlazor.MatButton Label="Set to false" OnClick="() => Value = false" />
@code {
public bool? Value { get; set; }
}
Click the buttons. The state of the checkbox doesn't change.
Blazorfiddle link
https://blazorfiddle.com/s/s7wd0j1x
Expected behavior
The checkbox state should change between clear, checked and indeterminate depending on the value of the nullable boolean.
Version is 2.6.2
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working