@evoke-platform/ui-components 1.0.2-testing.2 → 1.0.2-testing.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.
@@ -1,7 +1,7 @@
|
|
1
1
|
import { useApp, useAuthenticationContext, } from '@evoke-platform/context';
|
2
2
|
import { Components, Form as FormIO, Utils } from '@formio/react';
|
3
3
|
import { flatten } from 'flat';
|
4
|
-
import { isEqual, toPairs } from 'lodash';
|
4
|
+
import { isEmpty, isEqual, toPairs } from 'lodash';
|
5
5
|
import React, { useEffect, useRef, useState } from 'react';
|
6
6
|
import '../../../../styles/form-component.css';
|
7
7
|
import { Skeleton, Snackbar } from '../../../core';
|
@@ -320,7 +320,9 @@ export function Form(props) {
|
|
320
320
|
const submittedFields = {};
|
321
321
|
for (const field in submission.data) {
|
322
322
|
const value = submission.data[field];
|
323
|
-
if (value === '' ||
|
323
|
+
if (value === '' ||
|
324
|
+
(Array.isArray(value) && !value.length) ||
|
325
|
+
(typeof value === 'object' && isEmpty(value))) {
|
324
326
|
submittedFields[field] = null;
|
325
327
|
}
|
326
328
|
else {
|