Options
All
  • Public
  • Public/Protected
  • All
Menu

The props type of EasyFormDialog.

Hierarchy

  • EasyFormDialogProps

Index

Properties

Optional cancelButtonText

cancelButtonText?: string

The text of the cancel button. Defaults to "Cancel".

Optional closeRef

closeRef?: MutableRefObject<() => void>

This prop accepts a ref object that holds a function of type () => void. You can execute the function to programmatically close the dialog:

closeRef.current()

Optional focusFirst

focusFirst?: boolean

Set to false to disable the default behavior of focusing the first input.

formIsValid

formIsValid: boolean

A boolean indicating if the form is valid.

Optional modalClass

modalClass?: string

The CSS class added to the underlying Bootstrap modal.

Optional showFooter

showFooter?: boolean

Set to false to hide the modal footer, which contains the submit and cancel buttons.

showValidation

showValidation: boolean

A boolean indicating if validation feedback is being shown.

Optional submitButtonClass

submitButtonClass?: string

The CSS class of the submit button.

submitButtonText

submitButtonText: string

The text of the submit button.

Optional submitEnabled

submitEnabled?: boolean

Allows you to disable the submit button even if getSubmitEnabled() would return true.

This can be useful if you want to disable the submit button while a query is in progress.

title

title: ReactNode

The title of the dialog. Can be a JSX element.

Methods

Optional onCancel

  • onCancel(): void

onClose

  • onClose(): void

onShowValidationChange

  • onShowValidationChange(showValidation: boolean): void

onSubmit

onSuccess

  • onSuccess(payload: unknown): Promise<void>
  • A callback that fires after the submit function succeeds.

    If the submit function returned responseData, it is passed to your onSuccess function.

    Your onSuccess callback must return a promise. The submit button will continue showing a loading indicator until the promise resolves. This is to support refetching the data that was updated by the form submission.

    Parameters

    • payload: unknown

    Returns Promise<void>

Generated using TypeDoc