Hi everyone,
I’m trying to use the Polaris <Autocomplete>
component inside an App Bridge React <Modal>
, but I’m running into a z-index and portal issue.
The dropdown options from Autocomplete are rendering **outside of the modal container, and as a result, they appear behind the modal’s backdrop.
Here’s what I tried:
Added
position: relative
to the modal wrapper.
Used
zIndexOverride
on Autocomplete.
Wrapped Autocomplete in a
<div>
with a high z-index.
But none of these worked since Autocomplete uses a Portal internally and renders outside the modal DOM tree.
Is there an official Shopify-supported way to:
- Force Autocomplete’s dropdown to render inside the App Bridge Modal DOM tree?
- Or prevent the backdrop from covering it?
Would it be better to replace Autocomplete with Polaris <Combobox>
when used inside modals, as I’ve seen in some Shopify examples?
Any insights or recommended best practices would be appreciated!