Fix for MdRadioGroup absolute positioning #63
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes
The individual radio inputs of MdRadioGroup are absolutely positioned, without having a parent element within the component as relatively positioned. This resulted in weird positioning behaviour in a real life application since the position then became relative to an element further up the DOM, outside of the MdRadioGroup component itself.
Also used option.id when concatenating the options id-prop, instead of option.text which is more likely to be something more than plain text or number. (In my case the option.text-prop was a ReactNode/JSX element, which resulted in an id that looked like
radio_customGroupName_[object: Object]
Checklist before requesting a review
stories
-folder?packages/react/index.tsx
?packages/css/index.css
?