Skip to content

Commit

Permalink
fix(radio): unnecessary mergeRefs
Browse files Browse the repository at this point in the history
  • Loading branch information
wingkwong committed Mar 31, 2024
1 parent 4ee9959 commit eb0ebbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/components/radio/src/use-radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {radio} from "@nextui-org/theme";
import {useRadio as useReactAriaRadio} from "@react-aria/radio";
import {HTMLNextUIProps, PropGetter} from "@nextui-org/system";
import {__DEV__, warn, clsx, dataAttr} from "@nextui-org/shared-utils";
import {useDOMRef, mergeRefs} from "@nextui-org/react-utils";
import {useDOMRef} from "@nextui-org/react-utils";
import {chain, mergeProps} from "@react-aria/utils";

import {useRadioGroupContext} from "./radio-group-context";
Expand Down Expand Up @@ -218,8 +218,8 @@ export function useRadio(props: UseRadioProps) {
const getInputProps: PropGetter = useCallback(
(props = {}) => {
return {
ref: inputRef,
...mergeProps(props, inputProps, focusProps, {required: isRequired}),
ref: mergeRefs(ref, domRef),
onChange: chain(inputProps.onChange, onChange),
};
},
Expand Down

0 comments on commit eb0ebbf

Please sign in to comment.