AutocompleteInput component does not show suggestions in Modal (like Dialog or Drawer)
What you were expecting:
<AutocompleteInput /> should list suggestions in a modal view (e.g. within Material UI drawer or Dialog).
What happened instead:
Suggestion list of <AutocompleteInput /> is hidden by the modal (Drawer / Dialog) because of the wrong z-index the <AutocompleteSuggestionList /> is rendered (see https://github.com/marmelab/react-admin/blob/v3.8.2/packages/ra-ui-materialui/src/input/AutocompleteSuggestionList.tsx#L9)
Steps to reproduce:
Create a <SimpleForm /> within a <Dialog /> modal and use the <AutocompleteInput /> ui component.
Related code: https://github.com/marmelab/react-admin/blob/v3.8.2/packages/ra-ui-materialui/src/input/AutocompleteSuggestionList.tsx#L9
Environment
- React-admin version: 3.8.2
- Last version that did not exhibit the issue (if applicable): -
- React version: any
- Browser: any
- Stack trace (in case of a JS error): -
This is explained here: https://github.com/marmelab/react-admin/issues/2456#issuecomment-432224631.
If you need to use modals, then you'll have to provide your own Layout component and your own Notification component, overriding its styles to adjust its z-index
@djhi thanks for the reply and the hint with using the withStyles decorator here.
We should probably add a note about it in the documentation though