-
Notifications
You must be signed in to change notification settings - Fork 111
Fix docs for control inputs with initial checked state #551
Fix docs for control inputs with initial checked state #551
Conversation
azerella
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see where you've changed the prop definitions for the AUradio component ?
|
no need to change it for the actual component itself. It's just a fix in the example. then will update the example in designsystem.gov.au. I updated my comment in the PR to make it more clear. |
|
@sukhrajghuman Now I'm more confused lol, the codepen example sets |
|
It sets |
|
@sukhrajghuman Ahh, gotcha - LGTM |
|
We need to clean these PR's up they have a lot of unrelated file changes 👍 |
Since this is an uncontrolled component, passing the `checked` prop is overriding the `checked` attribute in the DOM. If we use `defaultChecked` it will allow for subsequent updates to be uncontrolled.
e616a43 to
4420b7c
Compare
|
@alex-page Fixed with a rebase |
Since this is an uncontrolled component, passing the
checkedattribute in<AUradio>and<AUcheckbox>is overriding thecheckedattribute in the DOM. This means the checkbox/radio box will remain checked. If we usedefaultChecked, it will be checked initially and allow for subsequent updates to be uncontrolled.fixes #544
I'm also going to put #548 on hold for now. I believe it's fairly low priority.