iTwin / iTwinUI

A design system for building beautiful and well-working web interfaces.
https://itwin.github.io/iTwinUI/
MIT License
92 stars 35 forks source link

Missing message on `RadioTileGroup` or `InputGroup` causes crash in React 17 #1979

Closed HaveSpacesuit closed 3 weeks ago

HaveSpacesuit commented 4 weeks ago

Describe the bug (current behavior)

After updating to iTwinUI-React 3.6, any component with an unset message prop will crash when it renders. Examples include <RadioTileGroup> and <InputGroup>. This is reproducible in React 17 but not React 18.

Adding a string or React Fragment for the message works around the bug.

In the linked radio, the dialog opens a radio tile group which crashes, and the "In stock" column filter opens an input group which crashes. Downgrading to iTwin react to 3.5 does not crash.

Expected Behavior

These components should be allowed to have message undefined without crashing

Link to minimal repro

https://stackblitz.com/edit/github-5hbkpa?file=src%2FmyRadioOptions.tsx,src%2FbooleanFilter.tsx

Steps To Reproduce

Anything else?

No response

mayank99 commented 2 weeks ago

fixed in 3.9.0 🚀