Skip to main content

closeDialog

closeDialog

Closes the dialog (or popover) the current form is shown in, returning a result to the caller.

Parameters

  • result (any): The result to return to whoever opened the dialog (may be null)

Returns: None (void)

Description

Use it from inside a dialog's form to close itself. When the form was opened as a popover, it still closes correctly through the popover controller.

closeDialog vs close vs closePopover

MethodBehavior
closeDialogPopover controller if it's a popover, otherwise Navigator.pop()
closeAlways Navigator.pop()
closePopoverCloses through the popover controller only

Example

// 확인 다이얼로그 내부에서
$form.closeDialog({ confirmed: true });

// 취소
$form.closeDialog({ confirmed: false });

Related

  • $form.close(result) — closes via Navigator.pop()
  • $form.closePopover(result) — closes a popover
  • $form.openDialog(formPath, linkArg, callback, options) — opens a dialog