|
1 | 1 | # Migration guide |
2 | 2 |
|
| 3 | +## Migration to JSON Forms 3.9 |
| 4 | + |
| 5 | +### Data update paths treat all segments literally |
| 6 | + |
| 7 | +Data updates (e.g. dispatched `update` actions) previously wrote to the form data via lodash's `set`/`unset`, which interpret bracket notation and array indices in paths. |
| 8 | +This corrupted data for property names that look like lodash path syntax, for example numeric property names like `"15"` were turned into array indices and names containing brackets like `"prop[0]"` were split up (see [#2397](https://github.com/eclipsesource/jsonforms/issues/2397) and [#2102](https://github.com/eclipsesource/jsonforms/issues/2102)). |
| 9 | + |
| 10 | +Updates now use the new `setDataAt`/`unsetDataAt` utilities of `@jsonforms/core`, which split paths on `.` and treat every segment as a literal property name, matching how JSON Forms resolves values for display. |
| 11 | +When a missing intermediate container is created, the JSON Schema decides whether it becomes an array or an object; without schema type information, a numeric follow-up segment creates an array, as before. |
| 12 | + |
| 13 | +If you dispatch update actions yourself, make sure to use dot-separated paths (e.g. `update('list.0.name', ...)`) instead of lodash bracket syntax (e.g. `update('list[0].name', ...)`), which is no longer interpreted. |
| 14 | + |
3 | 15 | ## Migrating to JSON Forms 3.8 |
4 | 16 |
|
5 | 17 | ### `Translator` type changed from overloaded signatures to a generic conditional type |
@@ -40,16 +52,6 @@ return this.t(label, label) as string; |
40 | 52 |
|
41 | 53 | This does not affect the Composition API where `Translator` is accessed directly from a `ComputedRef`. |
42 | 54 |
|
43 | | -### Data update paths treat all segments literally |
44 | | - |
45 | | -Data updates (e.g. dispatched `update` actions) previously wrote to the form data via lodash's `set`/`unset`, which interpret bracket notation and array indices in paths. |
46 | | -This corrupted data for property names that look like lodash path syntax, for example numeric property names like `"15"` were turned into array indices and names containing brackets like `"prop[0]"` were split up (see [#2397](https://github.com/eclipsesource/jsonforms/issues/2397) and [#2102](https://github.com/eclipsesource/jsonforms/issues/2102)). |
47 | | - |
48 | | -Updates now use the new `setDataAt`/`unsetDataAt` utilities of `@jsonforms/core`, which split paths on `.` and treat every segment as a literal property name, matching how JSON Forms resolves values for display. |
49 | | -When a missing intermediate container is created, the JSON Schema decides whether it becomes an array or an object; without schema type information, a numeric follow-up segment creates an array, as before. |
50 | | - |
51 | | -If you dispatch update actions yourself, make sure to use dot-separated paths (e.g. `update('list.0.name', ...)`) instead of lodash bracket syntax (e.g. `update('list[0].name', ...)`), which is no longer interpreted. |
52 | | - |
53 | 55 | ### Angular support now targets Angular 20 to 22 |
54 | 56 |
|
55 | 57 | When using JSON Forms 3.8, your Angular application now needs to target Angular 20, 21 or 22. |
|
0 commit comments