Skip to content

Commit

Permalink
Fix unlocking of inputs that exist in the data but not in the meta, f…
Browse files Browse the repository at this point in the history
…or example with tangy-input-groups
  • Loading branch information
rjcorwin committed Jun 16, 2020
1 parent 8a5e063 commit 396bef5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tangy-form-reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const tangyFormReducer = function (state = initialState, action) {
}
props.inputs = item.inputs.map(input => {
const inputMeta = itemMeta.inputs.find(inputMeta => inputMeta.name === input.name)
return Object.assign({}, input, {disabled: inputMeta.disabled})
return Object.assign({}, input, {disabled: inputMeta ? inputMeta.disabled : false})
})
return Object.assign({}, item, itemMeta, props)
})
Expand Down

0 comments on commit 396bef5

Please sign in to comment.