Skip to content

Commit

Permalink
fix: Fixed conditional logic for CHECKBOX
Browse files Browse the repository at this point in the history
  • Loading branch information
Sushant Kumar authored and kevinchappell committed Feb 23, 2020
1 parent 45f2440 commit a521730
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/js/common/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,15 +395,14 @@ class DOM {
const { action, attrs } = elem
const fieldType = attrs.type || elem.tag
const id = attrs.id || elem.id
const multipleOptions = options.length > 1 && fieldType !== 'radio'

const optionMap = (option, i) => {
const { label, ...rest } = option
const defaultInput = () => {
const input = {
tag: 'input',
attrs: {
name: multipleOptions ? `${id}[]` : id,
name: id,
type: fieldType,
value: option.value || '',
id: `${id}-${i}`,
Expand Down

0 comments on commit a521730

Please sign in to comment.