react-form-manage 1.0.8-beta.0 → 1.0.8-beta.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/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
|
+
## [1.0.8-beta.1] - 2026-01-22
|
|
4
5
|
|
|
6
|
+
- Fix UseFormItemControlReturn errors type to properly export FormFieldError[]
|
|
5
7
|
## [1.0.7-beta.1] - 2026-01-22
|
|
6
8
|
|
|
7
9
|
- Add `FormFieldError` type export for typed error handling
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type RefObject } from "react";
|
|
2
2
|
import type { FormInstance } from "../stores/formStore";
|
|
3
|
-
import type { SubmitState, ValidationRule } from "../types/public";
|
|
3
|
+
import type { FormFieldError, SubmitState, ValidationRule } from "../types/public";
|
|
4
4
|
type AnyObject = Record<string, any>;
|
|
5
5
|
interface UseFormItemControlProps {
|
|
6
6
|
formName?: string;
|
|
@@ -11,11 +11,11 @@ interface UseFormItemControlProps {
|
|
|
11
11
|
rules?: ValidationRule[];
|
|
12
12
|
elementRef?: RefObject<any> | null;
|
|
13
13
|
}
|
|
14
|
-
interface UseFormItemControlReturn {
|
|
14
|
+
export interface UseFormItemControlReturn {
|
|
15
15
|
value: any;
|
|
16
16
|
onChange: (value: any, options?: AnyObject) => void;
|
|
17
17
|
state: any;
|
|
18
|
-
errors:
|
|
18
|
+
errors: FormFieldError[];
|
|
19
19
|
onFocus: () => void;
|
|
20
20
|
isDirty?: boolean;
|
|
21
21
|
submitState?: SubmitState;
|
package/package.json
CHANGED
|
@@ -25,7 +25,11 @@ import {
|
|
|
25
25
|
} from "../stores/formStore";
|
|
26
26
|
|
|
27
27
|
import type { FormInstance } from "../stores/formStore";
|
|
28
|
-
import type {
|
|
28
|
+
import type {
|
|
29
|
+
FormFieldError,
|
|
30
|
+
SubmitState,
|
|
31
|
+
ValidationRule,
|
|
32
|
+
} from "../types/public";
|
|
29
33
|
|
|
30
34
|
type AnyObject = Record<string, any>;
|
|
31
35
|
|
|
@@ -39,11 +43,11 @@ interface UseFormItemControlProps {
|
|
|
39
43
|
elementRef?: RefObject<any> | null;
|
|
40
44
|
}
|
|
41
45
|
|
|
42
|
-
interface UseFormItemControlReturn {
|
|
46
|
+
export interface UseFormItemControlReturn {
|
|
43
47
|
value: any;
|
|
44
48
|
onChange: (value: any, options?: AnyObject) => void;
|
|
45
49
|
state: any;
|
|
46
|
-
errors:
|
|
50
|
+
errors: FormFieldError[];
|
|
47
51
|
onFocus: () => void;
|
|
48
52
|
isDirty?: boolean;
|
|
49
53
|
submitState?: SubmitState;
|