forked from redwoodjs/redwood
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix radio button null element default prop to use correct input (redw…
…oodjs#10510) Previously, radio buttons always had the first element that referred to `props.spot.spotType`: ``` <RadioField id=... name=... defaultValue=... defaultChecked={!props.spot?.spotType} className="rw-input" errorClassName="rw-input rw-input-error" /> ``` In actuality, instead of "spot" and "spotType" we should be using the actual name of the model and column! --------- Co-authored-by: Josh GM Walker <56300765+Josh-Walker-GM@users.noreply.github.com>
- Loading branch information
1 parent
1dd4e45
commit 8ee646b
Showing
5 changed files
with
370 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- Fix radio button null element default prop to use correct input (#10510) by @jason-curtis | ||
|
||
This change fixes an issue with the `defaultChecked` field when using the scaffold generator with an enum. You should now see correct code generated to determine if the default is checked or unchecked. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.