I'm currently using Material UI Data Grid to display a table on my website. The grid has an additional filter for each column, but when I click on the filter, it hides behind my Bootstrap Modal. Is there a way to bring it to the front?
https://i.stack.imgur.com/m9N0k.png
Below is the code snippet for the DataGrid inside the Modal:
<Modal show={this.state.menu} dialogClassName='modal-width'>
<div class='modal-content modal inmodal'>
<Modal.Header>
<Modal.Title></Modal.Title>
</Modal.Header>
<Modal.Body class='modal-body'>
{HCPTable}
</Modal.Body>
This is the section of HCP table variable that contains the Data Grid. Various if conditions are used to determine its visibility:
HCPTable =
<div class='row' style={{ marginTop: '15px' }}>
<div style={{ height: 400, width: '100%' }}>
<DataGrid
rows={this.state.advancedSearchResults} columns={columns} pageSize={5}
onRowSelected={(rowSelection) => {
this.setState({
selectedRow: rowSelection.data,
HCPSelected: new Array(String('[' + rowSelection.data.npi + ']'))
}, () => {
let HCPSelected = new Array(String('[' + rowSelection.data.npi + ']'))
console.log(HCPSelected);
console.log(typeof(HCPSelected));
console.log('state inside DataGrid: ',this.state);
})
}}
/>
</div>
</div>
I would like the filter dropdown to appear in front instead of behind. Adjusting the z-index in the mentioned class makes it visible, but I am unsure how to make this change permanent within my application.
Edit:
After some trial and error, I discovered that changing the z-index in the console brings the filter to the front. The specific class where the change was made is linked here:
https://i.stack.imgur.com/MbxfH.png
How can I access this class within my application to ensure the desired visibility at all times?
Edit2:
Shown below is a screenshot depicting the issue I aim to resolve: