@reactables/forms 2.0.0-beta.3 → 2.0.0-beta.5
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/RxForm/RxForm.d.ts +2 -2
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/RxForm/RxForm.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export interface RxFormProviders {
|
|
|
58
58
|
[key: string]: ValidatorAsyncFn;
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
export declare const build: <FormValue, CustomReducers extends Record<string, CustomReducer<FormValue, unknown>>>(config: AbstractControlConfig, options?: RxFormOptions<CustomReducers>) => Reactable<Form<FormValue>, { [K in keyof CustomReducers]: ActionCreatorTypeFromCustomReducer<CustomReducers[K]>; } & {
|
|
61
|
+
export declare const build: <FormValue, CustomReducers extends Record<string, CustomReducer<FormValue, unknown>> = Record<string, CustomReducer<FormValue, unknown>>>(config: AbstractControlConfig, options?: RxFormOptions<CustomReducers>) => Reactable<Form<FormValue>, { [K in keyof CustomReducers]: ActionCreatorTypeFromCustomReducer<CustomReducers[K]>; } & {
|
|
62
62
|
updateValues: <T>(payload: UpdateValuesPayload<T>) => void;
|
|
63
63
|
addControl: (payload: AddControlPayload) => void;
|
|
64
64
|
pushControl: (payload: PushControlPayload) => void;
|
|
@@ -70,7 +70,7 @@ export declare const build: <FormValue, CustomReducers extends Record<string, Cu
|
|
|
70
70
|
} & ActionMap & DestroyAction, CustomReducerActionTypes<CustomReducers> & FormActionTypes & {
|
|
71
71
|
destroy: 'destroy';
|
|
72
72
|
}>;
|
|
73
|
-
export declare const load: <FormValue, CustomReducers extends Record<string, CustomReducer<FormValue, unknown>>>(state: Form<FormValue>, options?: RxFormOptions<CustomReducers>) => Reactable<Form<FormValue>, { [K in keyof CustomReducers]: ActionCreatorTypeFromCustomReducer<CustomReducers[K]>; } & {
|
|
73
|
+
export declare const load: <FormValue, CustomReducers extends Record<string, CustomReducer<FormValue, unknown>> = Record<string, CustomReducer<FormValue, unknown>>>(state: Form<FormValue>, options?: RxFormOptions<CustomReducers>) => Reactable<Form<FormValue>, { [K in keyof CustomReducers]: ActionCreatorTypeFromCustomReducer<CustomReducers[K]>; } & {
|
|
74
74
|
updateValues: <T>(payload: UpdateValuesPayload<T>) => void;
|
|
75
75
|
addControl: (payload: AddControlPayload) => void;
|
|
76
76
|
pushControl: (payload: PushControlPayload) => void;
|
package/dist/index.cjs
CHANGED
|
@@ -384,9 +384,11 @@ var controlRefCheck = function (ref) {
|
|
|
384
384
|
catch (_a) { }
|
|
385
385
|
};
|
|
386
386
|
|
|
387
|
-
var checkKeys = function (
|
|
388
|
-
|
|
389
|
-
|
|
387
|
+
var checkKeys = function (oldObj, newObj) {
|
|
388
|
+
var oldKeys = Object.keys(oldObj).slice().sort().join();
|
|
389
|
+
var newKeys = Object.keys(newObj).slice().sort().join();
|
|
390
|
+
if (oldKeys !== newKeys) {
|
|
391
|
+
console.warn("You are trying to update multiple controls but they key don't match. It is recommended your keys match. Old keys: ".concat(oldKeys, ". New Keys: ").concat(newKeys, " "));
|
|
390
392
|
}
|
|
391
393
|
};
|
|
392
394
|
var updateDescendantValues = function (form, _a, providers) {
|