Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: MDBModal with MDBSelect

galtmidas free asked 3 years ago


Expected behavior enter image description here Actual behavior enter image description here Resources (screenshots, code snippets etc.) I can open the dev tools and add a z-index which leads to the expected behavior screenshot.

enter image description here

However, I cannot access this element to actually override the z-index

enter image description here

 <MDBModal tabIndex='-1' show={reassignModal} getOpenState={(e: any) => setReassignModal(e)} >

                <MDBModalDialog centered>

                <MDBModalContent>
                    <MDBModalHeader>
                    <MDBModalTitle>Reassign This Lead</MDBModalTitle>
                    <MDBBtn className='btn-close' color='none' onClick={toggleReassign}></MDBBtn>
                    </MDBModalHeader>
                    <MDBModalBody>
                    <MDBSelect
                                        label='Workflow'
                                        data={[
                                            { text: 'New', value: 1 },
                                            { text: 'Automated', value: 2 },
                                            { text: 'Hold', value: 3, selected: true },
                                            { text: 'None', value: 4 },
                                        ]}
                                    />
                    </MDBModalBody>
                    <MDBModalFooter>
                    <MDBBtn color='secondary' onClick={toggleReassign}>
                        Close
                    </MDBBtn>
                    <MDBBtn>Save changes</MDBBtn>
                    </MDBModalFooter>
                </MDBModalContent>

                </MDBModalDialog>
            </MDBModal> 

Krzysztof Wilk staff answered 3 years ago


Hi!

Thanks for reporting this issue. We will fix it in the next release (17.05) :) My temporary solution for this problem is to create a simple css file (if you don't have one) and add this rule:

div[data-popper-reference-hidden="false"] {
  z-index: 1070;
}

Keep coding!


galtmidas free answered 3 years ago


I marked this as resolved, is that the correct thing to do?


Krzysztof Wilk staff commented 3 years ago

Glad I could help :) And yes - this topic should have a "Resolved" status :D

Keep coding!


galtmidas free answered 3 years ago


Thanks @Krzysztof Wilk

Excellent workaround. It worked just fine.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: MDB5 1.0.0-beta1
  • Device: MacBook Pro
  • Browser: Chrome
  • OS: MacOS
  • Provided sample code: No
  • Provided link: No