@helpwave/hightide 0.6.1 → 0.6.2
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.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7342,6 +7342,9 @@ var FormStore = class {
|
|
|
7342
7342
|
getHasError() {
|
|
7343
7343
|
return Object.values(this.errors).some((value) => value !== void 0 && value !== null);
|
|
7344
7344
|
}
|
|
7345
|
+
getErrors() {
|
|
7346
|
+
return { ...this.errors };
|
|
7347
|
+
}
|
|
7345
7348
|
getError(key) {
|
|
7346
7349
|
return this.errors[key];
|
|
7347
7350
|
}
|
|
@@ -7532,8 +7535,10 @@ function useCreateForm({
|
|
|
7532
7535
|
},
|
|
7533
7536
|
validateAll: () => storeRef.current.validateAll(),
|
|
7534
7537
|
getError: (key) => storeRef.current.getError(key),
|
|
7535
|
-
|
|
7536
|
-
|
|
7538
|
+
getErrors: () => storeRef.current.getErrors(),
|
|
7539
|
+
getIsValid: () => !storeRef.current.getHasError(),
|
|
7540
|
+
getValue: (key) => storeRef.current.getValue(key),
|
|
7541
|
+
getValues: () => storeRef.current.getAllValues()
|
|
7537
7542
|
}), []);
|
|
7538
7543
|
return {
|
|
7539
7544
|
store: storeRef.current,
|