@bpmn-io/form-js-viewer 2.0.0 → 2.0.2
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/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +6 -5
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/theme.css +0 -168
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ids } from 'ids';
|
|
2
|
-
import { isString, get, isNil, isObject, some, isNumber, set, isDefined, findIndex, isArray, values, uniqueBy, isFunction, bind, assign, groupBy, isUndefined } from 'min-dash';
|
|
2
|
+
import { isString, get, isNil, isObject, some, merge, isNumber, set, isDefined, findIndex, isArray, values, uniqueBy, isFunction, bind, assign, groupBy, isUndefined } from 'min-dash';
|
|
3
3
|
import Big from 'big.js';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'preact/jsx-runtime';
|
|
@@ -1408,10 +1408,11 @@ function useFilteredFormData() {
|
|
|
1408
1408
|
const conditionChecker = useService('conditionChecker', false);
|
|
1409
1409
|
return useMemo(() => {
|
|
1410
1410
|
const newData = conditionChecker ? conditionChecker.applyConditions(data, data) : data;
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1411
|
+
|
|
1412
|
+
// deep-merge newData over a clone of initialData, so keys pruned from
|
|
1413
|
+
// newData (e.g. by a hidden group) fall back to their initial value
|
|
1414
|
+
// instead of the whole branch disappearing
|
|
1415
|
+
return merge(clone(initialData || {}), newData);
|
|
1415
1416
|
}, [conditionChecker, data, initialData]);
|
|
1416
1417
|
}
|
|
1417
1418
|
|