Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for MdRadioGroup absolute positioning #63

Merged
merged 1 commit into from
Dec 21, 2023
Merged

Conversation

kajsaeggum
Copy link
Contributor

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

  • I have performed a self-review and test of my code
  • If new component: Is story for component created in stories-folder?
  • If new component: Is tsx-file import added to packages/react/index.tsx?
  • If new component: Is css-file added to packages/css/index.css?

@kajsaeggum kajsaeggum requested a review from a team as a code owner December 21, 2023 12:15
@kajsaeggum kajsaeggum merged commit 3cb87dd into main Dec 21, 2023
@kajsaeggum kajsaeggum deleted the bugfix/radiogroup branch December 21, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants