Skip to content

Commit

Permalink
fix(ReactComponentLibrary): Do not drill isInvalid prop to DOM nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
m7kvqbe1 committed Nov 16, 2020
1 parent 84614e7 commit 7b2d067
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
onBlur,
onChange,
value,
isInvalid,
...rest
},
ref
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const CheckboxEnhanced: React.FC<CheckboxEnhancedProps> = ({
name,
tabIndex = 0,
title,
isInvalid,
...rest
}) => {
const ref = useRef(null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const Radio = forwardRef<HTMLInputElement, RadioProps>(
onChange,
onBlur,
value,
isInvalid,
...rest
},
ref
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const RadioEnhanced: React.FC<RadioEnhancedProps> = ({
name,
tabIndex = 0,
title,
isInvalid,
...rest
}) => {
const ref = useRef(null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { FieldProps } from '../../common/FieldProps'
import { FormProps } from '../../common/FormProps'
import { withFormik } from '../withFormik'

const DummyComponent: React.FC = (props) => (
const DummyComponent: React.FC = ({ isInvalid, ...props }: any) => (
<div data-testid="dummy-component" {...props} />
)
const DummyFormikComponent = withFormik(DummyComponent)
Expand Down

0 comments on commit 7b2d067

Please sign in to comment.