Skip to content

Commit 32bb431

Browse files
committed
fix(ui-radio-input,ui-checkbox): fix 'React does not recognize the isRequired prop on a DOM element' on RadioInputGroup and Checkbox
since these were not added to 'allowedProps', they were not excluded by 'allowedProps', so they were added to native DOM elements resulting in this warning Fixes INSTUI-4531
1 parent 904244a commit 32bb431

File tree

2 files changed

+4
-2
lines changed
  • packages

2 files changed

+4
-2
lines changed

packages/ui-checkbox/src/Checkbox/props.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ const allowedProps: AllowedPropKeys = [
143143
'size',
144144
'variant',
145145
'inline',
146-
'labelPlacement'
146+
'labelPlacement',
147+
'isRequired'
147148
]
148149

149150
type CheckboxState = {

packages/ui-radio-input/src/RadioInputGroup/props.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ const allowedProps: AllowedPropKeys = [
144144
'children',
145145
'variant',
146146
'size',
147-
'layout'
147+
'layout',
148+
'isRequired'
148149
]
149150

150151
export type { RadioInputGroupProps, RadioInputGroupState, RadioInputGroupStyle }

0 commit comments

Comments
 (0)