- updated modal window, added texts/choices by default;
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { head, isEmpty, isNil } from 'ramda';
|
||||
import { head, isEmpty, isNil, uniq } from 'ramda';
|
||||
import { __, sprintf } from '@wordpress/i18n';
|
||||
import { klona } from 'klona';
|
||||
import { wrap } from 'object-path-immutable';
|
||||
@@ -76,6 +76,7 @@ const BuilderElementSettings = ({ closeSettingsFn, callStatus, context }) => {
|
||||
newActiveElementData = wrap(newActiveElementData).set(['dynamicData'], dynamicData).value();
|
||||
newActiveElementData = wrap(newActiveElementData).set(['criteria'], criteria).value();
|
||||
const newElements = elements.map(o => o.id === newActiveElementData.id ? newActiveElementData : o);
|
||||
|
||||
storeSet.main.formElements(newElements);
|
||||
closeSettingsFn();
|
||||
}
|
||||
@@ -123,7 +124,7 @@ const BuilderElementSettings = ({ closeSettingsFn, callStatus, context }) => {
|
||||
});
|
||||
}
|
||||
|
||||
settings = settings.filter(o => context === 'call'
|
||||
settings = uniq([...settings, ...chosen.settings]).filter(o => context === 'call'
|
||||
? !['isRequestedAmount', 'isDelegation', ''].includes(o.name)
|
||||
: !['isChecklistItem'].includes(o.name));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user