Skip to content

Commit 570d62d

Browse files
committed
deactivatedFormInputs should deactivate form inputs in array
1 parent 404f6d1 commit 570d62d

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/formBuilder/defaults/arrayInputs.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import React, { useState } from 'react';
44
import { Input } from 'reactstrap';
55
import {
6+
excludeKeys,
67
generateElementComponentsFromSchemas,
78
generateCategoryHash,
89
} from '../utils';
@@ -75,14 +76,15 @@ function getInnerCardComponent({
7576
const [elementId] = useState(getRandomId);
7677
const newDataProps = {};
7778
const newUiProps = {};
78-
const allFormInputs = Object.assign(
79-
{
80-
...defaultFormInputs,
81-
},
82-
{
83-
...(mods && mods.customFormInputs),
84-
},
79+
const allFormInputs = excludeKeys(
80+
Object.assign(
81+
{},
82+
defaultFormInputs,
83+
(mods && mods.customFormInputs) || {},
84+
),
85+
mods && mods.deactivatedFormInputs,
8586
);
87+
8688
// parse components into data and ui relevant pieces
8789
Object.keys(parameters).forEach((propName) => {
8890
if (propName.startsWith('ui:*')) {

0 commit comments

Comments
 (0)