Open shrutikakhadyeCBRE opened 1 month ago
You can set Height of dialog after init. But you cannot set width, it is always 480px defined by parent element of frame which render dialog.
await SDK.notifyLoadSucceeded().then(() => { SDK.resize(undefined, 500); });
We want to implement a Modal in ADO plugin where we should be able to update the Modal size ie. The height and the width.
As there was the modal size issue, we were using panels as an alternative option.
We are using "ms.vss-features.host-dialog-service" service and openCustomDialog method for implementing the Modal in our extension.
Below is the code snippet for openCustomDialog method.
import * as SDK from "azure-devops-extension-sdk"; SDK.init();
const openDialog = async() => {
const dialogService = await SDK.getService( "ms.vss-features.host-dialog-service" ); await dialogService.openCustomDialog(context.id + ".registration-form", { message: "This is a custom message", title: "Improve Form", configuration: { isModalOpen: true }, onClose: (result) => { if (result !== undefined) { console.log("Dialog result:", result); } }, }); }
openDialog();
Also, we don’t have an option in the interface to manage the size of the Modal https://learn.microsoft.com/en-us/javascript/api/azure-devops-extension-api/idialogoptions
Can someone help me with fixing this issue?