@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/change-log.md
CHANGED
|
@@ -333,4 +333,10 @@
|
|
|
333
333
|
- Revert change that made type inference impossible in `FormModalProvider`
|
|
334
334
|
|
|
335
335
|
##### Version 0.9.2
|
|
336
|
-
- Make types in `FormModalProvider` more flexible
|
|
336
|
+
- Make types in `FormModalProvider` more flexible
|
|
337
|
+
|
|
338
|
+
##### Version 0.9.3
|
|
339
|
+
- Fix types of updater functions in `FormModalProvider`
|
|
340
|
+
|
|
341
|
+
##### Version 0.9.4
|
|
342
|
+
- Make `initialState` in `FormModalProvider` optional
|
|
@@ -29,17 +29,11 @@ export interface FormEditModalButtonProps<T, K> extends ButtonProps {
|
|
|
29
29
|
export declare const FormEditModalButton: ({ state, onClick, ...props }: FormEditModalButtonProps<T, K>) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
export type FormModalProviderProps<T extends FormFields, K extends IncludeData<T>> = {
|
|
31
31
|
formFields: T;
|
|
32
|
-
initialState
|
|
32
|
+
initialState?: InitialState<T> | K;
|
|
33
33
|
includeData?: K;
|
|
34
|
-
onSave?:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
onCreate?: (state: {
|
|
38
|
-
[key in keyof T]: FormValue;
|
|
39
|
-
} & K, callback?: () => void) => void;
|
|
40
|
-
onUpdate?: (state: {
|
|
41
|
-
[key in keyof T]: FormValue;
|
|
42
|
-
} & K, callback?: () => void) => void;
|
|
34
|
+
onSave?: any;
|
|
35
|
+
onCreate?: any;
|
|
36
|
+
onUpdate?: any;
|
|
43
37
|
validate?: Validate;
|
|
44
38
|
createModalTitle?: ModalTitle;
|
|
45
39
|
editModalTitle?: ModalTitle;
|