| node | HTML Element | Form root DOM element. |
| on | (eventType, callback) => void | Listen to the form event |
| off | (eventType, callback) => void | Unlisten to the form event |
| getData | ({ noCopy }) => object | Get all data for the form; by default, a copy is made to remove object references, noCopy prevents this copying behavior. |
| setData | (newData, { noCopy }) => void | Replace all data in the form with newData; by default, a copy is made to remove object references, noCopy prevents this copying behavior. |
| getDataWithPreprocessor | ({ noCopy }) => object | Get the data that the form has been processed and can be submitted to the backend; by default, a copy is made to remove object references, noCopy prevents this copying behavior. |
| getContext | () => object | Obtain the upper and lower information, such as userProfile, etc. |
| getValue | (id) => any | Get the value of a single field |
| setValue | (id, newValue, { noCopy }) => void | Set the value of a single field; by default, a copy is made to remove object references, noCopy prevents this copying behavior. |
| getInitialValues | ({ noCopy }) => object | Get all the data at the beginning of the form; by default, a copy is made to remove object references, noCopy prevents this copying behavior. |
| setInitialValue | (id, initialValue, { notReplaceValue, noCopy }) => any | Set the value of a single field, by default, the current value of the changed field will be replaced together, and 'notReplaceValue' can be set to 'true' to only set the initial value without replacing the current value; by default, a copy is made to remove object references, noCopy prevents this copying behavior. |
| getErrors | () => object | Get all error messages for the form |
| setErrors | (errors) => void | Set Form Error Message |
| setError | (id, error) => void | Set the error message |
| getFieldApis | () => object | Get all available fields API |
| getFieldApi | (id) => object | To get the API of a single field, the API exposed by each component is different, for example, EditableTable, please refer to the API documentation for each component |
| validateForm | () => Promise | Immediately verify that the current form data is valid, and the return value of Promise then is errors |
| isDataValid | () => boolean | Whether the current form data is valid |
| isDirty | () => boolean | Whether the current form data has been modified |
| registerMethod | (name, func) => void | Register the function, and the Button's 'call formMethod' action can be called to |
| getMethods | () => object | Get all registered functions |
| setFieldComponentProps | (id, componentProps) => void | By dynamically setting the componentProps of a component by JS, you can solve the problem that callbacks cannot be written in json mode, and the properties of many components are in the form of callbacks. |
| submit | ({ saveOnly, handler }) => Promise | Submit Form |
| refresh | () => void | Refresh the form |
| cancel | () => void | Cancel and go back to the previous page |
| reset | ({ initialValues }) => void | Remake form data |
| getProps | () => object | Get all the properties of the form |