dcx-react-library icon indicating copy to clipboard operation
dcx-react-library copied to clipboard

onChange prop in FormGroup should be optional

Open brightpixels opened this issue 2 years ago • 0 comments

We are using the FormGroup component to render a list of radio buttons in a "progressively enhanced" app where it can be used with or without Javascript.

The onChange prop is mandatory and in our app we don't want set this prop as we don't want to control the values/state via Javascript.

To Reproduce Use the FormGroup component in a server-side React app like Remix.

Expected behavior To be able to use the component without passing in an onChange prop Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information): N/A

Smartphone (please complete the following information): N/A

Additional context N/A

brightpixels avatar Dec 06 '22 11:12 brightpixels