Skip to content

Commit

Permalink
PR Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
BPScott committed Sep 5, 2019
1 parent 14fd04a commit 6c616fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
### Code quality

- Migrated `ActionMenu.RollupAction`, `Autocomplete`, `Card`, `EmptySearchResult`, `Form`, `SkeletonPage` and `TopBar` to use hooks instead of withAppProvider ([#2065](https://github.com/Shopify/polaris-react/pull/2065))
- Added `useUniqueId` hook that can be used to get a unique id that remains consistent between rerenders and update components to use it where appropriate ([#2079](https://github.com/Shopify/polaris-react/pull/2079))
- Added `useUniqueId` hook that can be used to get a unique id that remains consistent between rerenders and updated components to use it where appropriate ([#2079](https://github.com/Shopify/polaris-react/pull/2079))

### Deprecations
8 changes: 4 additions & 4 deletions src/components/RadioButton/RadioButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ export function RadioButton({
onChange,
onFocus,
onBlur,
id: providedId,
name: providedName,
id: idProp,
name: nameProp,
value,
}: RadioButtonProps) {
const id = useUniqueId('RadioButton', providedId);
const name = providedName || id;
const id = useUniqueId('RadioButton', idProp);
const name = nameProp || id;

function handleChange({currentTarget}: React.ChangeEvent<HTMLInputElement>) {
onChange && onChange(currentTarget.checked, id);
Expand Down

0 comments on commit 6c616fe

Please sign in to comment.