Closed sibelius closed 6 years ago
@sibelius I've been looking at this since you've reported it. The root cause appears to be the use of a Portal within Popper (we used to use react-travel's Portal but then switched to Material-UI's impl, and then removed the direct usage when switching to Material-UI's Popper instead of react-popper.
If I add disablePortal
prop to Popper
this fixes the downshift error, but breaks usage with Dialogs.
I then tried to add a Portal
reference explicitly back, but with unsatisfactory results. Lastly, I added the { suppressRefError: true }
as the second argument to getMenuProps
and this resolved the issue, although I question if there isn't an underlying issue here being exposed (maybe the cause of #43)
Released version 1.0.4
with the fix.
Awesome work, tks
@sibelius welcome
https://github.com/paypal/downshift/releases/tag/v2.0.20
the validation of
getMenuProps
is causing troubles, like this:I think the problem is that we don't always use
getMenuProps
, like herehttps://github.com/techniq/mui-downshift/blob/master/src/Menu.js#L190
An idea to fix this is to use
suppressRefError
prop