@jasperoosthoek/react-toolbox 0.9.1 → 0.9.3

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
@@ -327,4 +327,13 @@
327
327
  - Support both declarative (modal) and flexible (custom layout) form patterns
328
328
  - Backwards compatible - existing FormModalProvider usage continues to work
329
329
  - Renamed `FormTextArea` to `FormTextarea`
330
- - Many more tests with about 72% coverage
330
+ - Many more tests with about 72% coverage
331
+
332
+ ##### Version 0.9.1
333
+ - Revert change that made type inference impossible in `FormModalProvider`
334
+
335
+ ##### Version 0.9.2
336
+ - Make types in `FormModalProvider` more flexible
337
+
338
+ ##### Version 0.9.3
339
+ - Fix types of updater functions in `FormModalProvider`
@@ -31,15 +31,15 @@ export type FormModalProviderProps<T extends FormFields, K extends IncludeData<T
31
31
  formFields: T;
32
32
  initialState: InitialState<T> | K;
33
33
  includeData?: K;
34
- onSave?: (state: {
34
+ onSave?: (state: ({
35
35
  [key in keyof T]: FormValue;
36
- } & K, callback?: () => void) => void;
37
- onCreate?: (state: {
36
+ }), callback?: () => void) => void;
37
+ onCreate?: (state: ({
38
38
  [key in keyof T]: FormValue;
39
- } & K, callback?: () => void) => void;
40
- onUpdate?: (state: {
39
+ }), callback?: () => void) => void;
40
+ onUpdate?: (state: ({
41
41
  [key in keyof T]: FormValue;
42
- } & K, callback?: () => void) => void;
42
+ }), callback?: () => void) => void;
43
43
  validate?: Validate;
44
44
  createModalTitle?: ModalTitle;
45
45
  editModalTitle?: ModalTitle;