DevExpress/DevExtreme

Typescript definition for `CustomDialogOptions` missing `popupOptions` property

alfeg opened this issue · 2 comments

alfeg commented

Typescript definition for CustomDialogOptions missing popupOptions property

Steps to Reproduce:

Using following typescript snippet

import { custom } from "devextreme/ui/dialog"
const dialog = custom({
        popupOptions: {
            position: {
                my: "center",
                at: "center",
                of: "#app",
            },
        },
}
})

Results You Received:

Typescript error

Argument of type '{ title: any; messageHtml: any; showTitle: boolean; buttons: { text: string; type: "back" | "danger" | "default" | "normal" | "success"; visible: boolean; onClick(): boolean; }[]; dragEnabled: false; popupOptions: { ...; }; }' is not assignable to parameter of type 'CustomDialogOptions'.
  Object literal may only specify known properties, and 'popupOptions' does not exist in type 'CustomDialogOptions'.ts(2345)

Results You Expected:

No errors, as custom dialog accepts this property:

}, options.popupOptions));

Environment Details:

devextreme: 21.1.4

Hi @alfeg,

according to the docs, custom dialog doesn't containt popupOptions property (at least for public).

For you purpose, consider using Popup with custom template

alfeg commented

@Bykiev nice catch. Have been using this several years, haven't realize it's internal API.

We need to show confirmation popup from non .vue code...