SOLFIND
Web Lens
Portal home

EasyFormDialogProps | TypeDoc Example

https://typedoc.org/example/interfaces/EasyFormDialogProps.html • 43 KB fetched
Open original page


EasyFormDialogProps | TypeDoc Example TypeDoc Example Docs API GitHub Preparing search index... * EasyFormDialogProps Interface EasyFormDialogProps The props type of EasyFormDialog . interface EasyFormDialogProps {      title : ReactNode ;      submitButtonText : string ;      submitButtonClass ?: string ;      cancelButtonText ?: string ;      submitEnabled ?: boolean ;      formIsValid : boolean ;      showValidation : boolean ;      onShowValidationChange ( showValidation : boolean ) : void ;      onSuccess ( payload : unknown ) : Promise < void > ;      onClose () : void ;      onSubmit (          formData : Record < string , string | boolean > ,      ) :          | Promise < void >          | Promise < { shouldClose ?: boolean ; responseData : unknown } | undefined > ;      onCancel ? () : void ;      closeRef ?: MutableRefObject < () => void > ;      modalClass ?: string ;      focusFirst ?: boolean ;      showFooter ?: boolean ; } * Defined in example/src/reactComponents.tsx:85 Index Properties title submit Button Text submit Button Class? cancel Button Text? submit Enabled? form Is Valid show Validation close Ref? modal Class? focus First? show Footer? Methods on Show Validation Change on Success on Close on Submit on Cancel? Properties title title : ReactNode The title of the dialog. Can be a JSX element. * Defined in example/src/reactComponents.tsx:87 submit Button Text submitButtonText : string The text of the submit button. * Defined in example/src/reactComponents.tsx:90 Optional submit Button Class submitButtonClass ?: string The CSS class of the submit button. * Defined in example/src/reactComponents.tsx:93 Optional cancel Button Text cancelButtonText ?: string The text of the cancel button. Defaults to "Cancel". * Defined in example/src/reactComponents.tsx:96 Optional submit Enabled 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. * Defined in example/src/reactComponents.tsx:105 form Is Valid formIsValid : boolean A boolean indicating if the form is valid. * Defined in example/src/reactComponents.tsx:108 show Validation showValidation : boolean A boolean indicating if validation feedback is being shown. * Defined in example/src/reactComponents.tsx:111 Optional close Ref 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 () Copy * Defined in example/src/reactComponents.tsx:177 Optional modal Class modalClass ?: string The CSS class added to the underlying Bootstrap modal. * Defined in example/src/reactComponents.tsx:180 Optional focus First focusFirst ?: boolean Set to false to disable the default behavior of focusing the first input. * Defined in example/src/reactComponents.tsx:186 Optional show Footer showFooter ?: boolean Set to false to hide the modal footer, which contains the submit and cancel buttons. * Defined in example/src/reactComponents.tsx:192 Methods on Show Validation Change * onShowValidationChange ( showValidation : boolean ) : void A callback that fires when the dialog is submitted. Parameters * showValidation : boolean Returns void * Defined in example/src/reactComponents.tsx:114 on Success * 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 > * Defined in example/src/reactComponents.tsx:126 on Close * onClose () : void A callback that fires when the dialog has completely closed. Your onClose callback should update call, for example, setDialogVisible(false) so that the EasyFormDialog is no longer rendered. Returns void * Defined in example/src/reactComponents.tsx:134 on Submit * onSubmit (      formData : Record < string , string | boolean > , ) :      | Promise < void >      | Promise < { shouldClose ?: boolean ; responseData : unknown } | undefined > A callback that fires when the form is submitted. You will typically perform an API call in your submit function. Your submit function can optionally return an object in the shape { shouldClose ?: boolean responseData : unknown } Copy Using formData is deprecated. Use controlled components instead. formData will be {} if the optional peer dependency jquery is not installed. Parameters * formData : Record < string , string | boolean > Returns      | Promise < void >      | Promise < { shouldClose ?: boolean ; responseData : unknown } | undefined > * Defined in example/src/reactComponents.tsx:154 Optional on Cancel * onCancel ? () : void An uncommonly-used callback that fires when the user clicks the cancel button. Returns void * Defined in example/src/reactComponents.tsx:167 Settings Member Visibility * Protected * Inherited * External Theme OS Light Dark On This Page Properties title submit Button Text submit Button Class cancel Button Text submit Enabled form Is Valid show Validation close Ref modal Class focus First show Footer Methods on Show Validation Change on Success on Close on Submit on Cancel Docs API GitHub TypeDoc Example * Loading... Generated using TypeDoc

Links found on this page

  1. TypeDoc Example [direct]
  2. Docs [direct]
  3. API [direct]
  4. GitHub [direct]
  5. EasyFormDialogProps [direct]
  6. EasyFormDialog [direct]
  7. example/src/reactComponents.tsx:85 [direct]
  8. TypeDoc Example [direct]