@jasperoosthoek/react-toolbox 0.9.2 → 0.9.4
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/package.json
CHANGED
|
@@ -91,11 +91,11 @@ export type FormModalProviderProps<
|
|
|
91
91
|
K extends IncludeData<T>
|
|
92
92
|
> = {
|
|
93
93
|
formFields: T;
|
|
94
|
-
initialState
|
|
94
|
+
initialState?: InitialState<T> | K;
|
|
95
95
|
includeData?: K;
|
|
96
|
-
onSave?:
|
|
97
|
-
onCreate?:
|
|
98
|
-
onUpdate?:
|
|
96
|
+
onSave?: any;
|
|
97
|
+
onCreate?: any;
|
|
98
|
+
onUpdate?: any;
|
|
99
99
|
validate?: Validate;
|
|
100
100
|
createModalTitle?: ModalTitle;
|
|
101
101
|
editModalTitle?: ModalTitle;
|
|
@@ -193,7 +193,7 @@ export const FormModalProvider: React.FC<FormModalProviderProps<T, K>> = ({
|
|
|
193
193
|
{createModalActive && (onCreate || onSave) && (
|
|
194
194
|
<FormProvider
|
|
195
195
|
formFields={formFields}
|
|
196
|
-
initialState={initialState as InitialState<T>}
|
|
196
|
+
initialState={(initialState || {}) as InitialState<T>}
|
|
197
197
|
onSubmit={handleCreateSubmit}
|
|
198
198
|
validate={validate}
|
|
199
199
|
loading={loading}
|