MDBIframe

mark-steven-au pro premium asked 8 months ago

Expected behavior Method to disable vertical scrolling in MDBIframe Actual behavior Have tried a number of methods overflow="hidden" scrolling="no" scrolling="false" style={{ scrolling: no }} hidden etc Resources (screenshots, code snippets etc.) Is there a way to disable scrolling


Magdalena Dembna staff premium commented 8 months ago

Can you edit your post so it includes a code snippet? Best regards, Magdalena


mark-steven-au pro premium answered 8 months ago

Hi Magdalena, Not much to post really as it is default MDB page modal with an Iframe insert. Basically do not want the modal to scroll at all.

import React, { Component } from "react";

import { MDBBtn, MDBModal, MDBModalBody, MDBModalFooter, MDBRow, MDBIcon, MDBIframe } from "mdbreact";

class IframePage extends Component { state = { modal11: false, }

toggle = nr => () => {
    let modalNumber = "modal" + nr;
    this.setState({
        ...this.state,
        [modalNumber]: !this.state[modalNumber]
    });
}


render() {
    return (
        <MDBRow>
            <MDBBtn onClick={this.toggle(11)}>Launch  Connect</MDBBtn>
            <MDBModal size="md" isOpen={this.state.modal11} toggle={this.toggle(11)}>

                <MDBModalBody className="mb-0 p-0">


                    <MDBIframe allowFullScreen title="connect" src="https://vmixcall.com" >
                        <img src="Vmixcalllogo-300-bl.png" />
                    </MDBIframe>
                </MDBModalBody>
                <MDBModalFooter className="justify-content-center">

                    <MDBBtn color="primary" outline rounded size="md" className="ml-4" onClick={this.toggle(11)}>
                        Close
      </MDBBtn>
                </MDBModalFooter>
            </MDBModal>
        </MDBRow >
    );
}

}

export default IframePage;


Magdalena Dembna staff premium commented 8 months ago

Unfortunately, there's no such functionality built-in mdbModal. If you want to disable scrolling you need to create a custom function to do it. Best regards, Magdalena


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: React
  • MDB Version: 4.27.0
  • Device: iOS
  • Browser: all
  • OS: iOS
  • Provided sample code: No
  • Provided link: No