iTwin / iTwinUI-react

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

ComboBox dropdown opens hidden #903

Closed NancyMcCallB closed 1 year ago

NancyMcCallB commented 1 year ago

When a ComboBox is hosted in a ModelessDialog in AppUi, the dropdown opens hidden. Link to a minimal repro: https://www.itwinjs.org/sandboxes/NancyMcCall/ComboBox%20in%20ModelessDialog

  1. Push "Open Modeless Dialog" button
  2. Click in the ComboBox to expand menu

Inspecting the popover shows that although the data-state is set to visible, the iui-popover class is overriding it and setting visible:hidden. image

mayank99 commented 1 year ago

I don't think this is a bug in iTwinUI. We investigated this in https://github.com/iTwin/iTwinUI-react/issues/783#issuecomment-1220757136 and found that it's happening because the modeless dialog size is 0x0.