@socotra/ec-react-components 2.0.1-alpha.2 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';
8
8
  * AccountForm is a form for creating or updating an account. It accepts a resolved data model, custom data types, and an optional account object to put the form in update mode. References: https://rjsf-team.github.io/react-jsonschema-form/docs/
9
9
  */
10
10
  export declare const AccountForm: {
11
- ({ accountsModel, accountType, dataTypes, handleSubmit, hideSubmitButton, account, submitButtonText, id, }: Props): JSX_2.Element;
11
+ ({ accountsModel, accountType, dataTypes, disabled, handleSubmit, isSubmitting, preventFormResetOnDisabled, hideSubmitButton, account, submitButtonText, id, }: Props): JSX_2.Element;
12
12
  displayName: string;
13
13
  };
14
14
 
@@ -34,6 +34,19 @@ declare type Props = {
34
34
  * The function to call when the form is submitted. It will create an AccountCreateRequest or AccountUpdateRequest based on the form data
35
35
  */
36
36
  handleSubmit: (data: AccountRequest) => void;
37
+ /**
38
+ * Set to true when the form is submitting to set fields to readonly and disable the submit button
39
+ */
40
+ isSubmitting?: boolean;
41
+ /**
42
+ * Disables the form
43
+ */
44
+ disabled?: boolean;
45
+ /**
46
+ * Prevents the form from resetting when disabled
47
+ * default is false
48
+ */
49
+ preventFormResetOnDisabled?: boolean;
37
50
  /**
38
51
  * The account object to put the form in update mode
39
52
  */