-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IFrameDialog - dimensions issue #303
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
Hi @meerapan |
@AJIXuMuK private handleClick = (): void =>{
} IframeDialog.tsx -public render(): React.ReactElement { <PrimaryButton className={styles.button} text={'Test: ' + this.props.docCount} onClick={this._onClick.bind(this)} /> <IFrameDialog url={this.props.reportUrl} iframeOnLoad={this._onDlgLoaded.bind(this)} hidden={!this.state.isDlgOpen} onDismiss={this._onDlgDismiss.bind(this)} modalProps={{ isBlocking: true, containerClassName: styles.container }} dialogContentProps={{ type: DialogType.close, showCloseButton: true }} width={'800px'} height={'800px'} scrolling={'no'} seamless={false} allowFullScreen={true} name = {'docFrame'}/> ); } private _onClick(): void { this.setState({ isDlgOpen: true }); $(".ms-Dialog-main").css({"max-width":"800px !important","width":"800px !important"}); $(".main ").css("max-width","800px !important"); $(".ms-Dialog-main").css({"max-height":"800px !important","height":"800px !important"}); $(".main ").css("max-height","800px !important"); $(".ms-Dialog-inner ").css("padding","0px"); } |
Could you please share your extension as a github repo? I’ll play with it. |
Not sure if I can add it to a repo due to some concerns. How else can it can be done? |
Tried adding zip file. But it's bigger than what GitHub allows. |
You are correct. Width is not applied when the dialog is called from App Customizer.
I assume that you use ms-Dialog-main in your SCSS file. In that case SPFx warns you that such name is not type-safe. It's not a big deal.
You have a Github profile, so you can create public repos with no issues. |
Just browsed through the sample for App Customizer and noticed this import statement - import { DialogLauncher, IDialogLauncherProps } from '../../components/DialogLauncher'. |
@meerapan |
This fix has now been merged and will be available in the new release. You can already test it out by installing the latest beta version. More information on how you can test out a beta version can be found here: https://sharepoint.github.io/sp-dev-fx-controls-react/beta/ |
Appreciate the quick turnaround time. Thank you so much. It's been a lazy looooong weekend here in CA. Trying to test it out. One quick question - can the dialog be set to resize dynamically based on the content within? |
Hi @meerapan, Did you find an answer to your question? According to me, the current features of the IFrameDialog control doesn't provide a way to resize its container based on the content within, but maybe it's something that could be studied as an enhancement 🙂 |
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within next 7 days of this comment. Thank you for your contributions to SharePoint Developer activities. |
Closing issue due no response from original author. If this issue is still occurring, please open a new issue with additional details. Notice that if you have included another related issue as additional comment on this, please open that also as separate issue, so that we can track it independently. |
Need some help with controlling the height and width of IFrameDialog. I've created an SPFx extension that uses the IFrameDialog control as in the code sample- https://github.com/AJIXuMuK/SPFx/tree/master/iframe-dialog-example
Width and height attributes of the control have been set. CSS formatting is also applied. However, the width and the height of the dialog do not conform to the width, height specified in the control or CSS. Also get a warning(on bundling) about '.ms-Dialog-main'not being camel case - Warning - [sass] The local CSS class 'ms-Dialog-main' is not camelCase and will not be type-safe.
How can this issue with dialog dimensions be tackled? Please help.
The text was updated successfully, but these errors were encountered: