Bugfix - merge tag was incorrectly validate when only name was entered and Save was clicked immediately after
This commit is contained in:
parent
b26f5008da
commit
01720ae128
6 changed files with 17 additions and 17 deletions
|
@ -73,9 +73,9 @@ export default class CUD extends Component {
|
|||
entity: PropTypes.object
|
||||
}
|
||||
|
||||
onMailerTypeChanged(mutState, key, oldType, type) {
|
||||
onMailerTypeChanged(mutStateDate, key, oldType, type) {
|
||||
if (type) {
|
||||
this.mailerTypes[type].afterTypeChange(mutState);
|
||||
this.mailerTypes[type].afterTypeChange(mutStateDate);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,12 +23,12 @@ export const mailerTypesOrder = [
|
|||
export function getMailerTypes(t) {
|
||||
const mailerTypes = {};
|
||||
|
||||
function initFieldsIfMissing(mutState, mailerType) {
|
||||
function initFieldsIfMissing(mutStateData, mailerType) {
|
||||
const initVals = mailerTypes[mailerType].initData();
|
||||
|
||||
for (const key in initVals) {
|
||||
if (!mutState.hasIn([key])) {
|
||||
mutState.setIn([key, 'value'], initVals[key]);
|
||||
if (!mutStateData.hasIn([key])) {
|
||||
mutStateData.setIn([key, 'value'], initVals[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue