iTwin / iTwinUI-react

A react component library for iTwinUI.
https://github.com/iTwin/iTwinUI
Other
84 stars 23 forks source link

ComboBox: Infinite loop #697

Closed Guillar1 closed 2 years ago

Guillar1 commented 2 years ago

Describe the bug (actual behavior)

Externally changing the controlled value of the ComboBox is not respected or an infinite loop occurs.

Reproduction

https://codesandbox.io/s/itwinui-react-example-forked-v8pllg?file=/src/App.tsx

JonasDov commented 2 years ago

We are facing the same issue, and need a fix ASAP.

mayank99 commented 2 years ago

This is fixed and released in 1.41.0 but you'll need to make sure to memoize your options. We are still investigating if it's possible to avoid the infinite loop without memoizing.