Frappe V 13 Can't change dialog width

Dear All,

I used the below code in V 12 to change the width of dialog and it worked great.
But now in V 13 it is not working any more.

let d = new frappe.ui.Dialog({
    title: 'Enter details',
    fields: [
        {
            label: 'First Name',
            fieldname: 'first_name',
            fieldtype: 'Data'
        }
    ],
    primary_action_label: 'Submit',
    primary_action(values) {
        console.log(values);
        d.hide();
    }
});

d.show();
d.$wrapper.find('.modal-dialog').css("width", "90%");

any suggestions on how to do the same in V 13

Found a solution

d.$wrapper.find('.modal-dialog').css("max-width", "90%");
d.$wrapper.find('.modal-dialog').css("width", "90%");
5 Likes

The code of @ahmedfme can be simplified toa one-liner.

d.$wrapper.find('.modal-dialog').css("max-width", "90%").css("width", "90%");
2 Likes