Преглед изворни кода

Merge pull request #272 from smiclea/enum-option

Fix options field rendering of empty 'enum' array
Dorin Paslaru пре 7 година
родитељ
комит
674f399b38
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/components/molecules/WizardOptionsField/WizardOptionsField.jsx

+ 1 - 1
src/components/molecules/WizardOptionsField/WizardOptionsField.jsx

@@ -198,7 +198,7 @@ class WizardOptionsField extends React.Component<Props> {
         field = this.renderSwitch({ triState: true })
         break
       case 'string':
-        if (this.props.enum) {
+        if (this.props.enum && this.props.enum.length) {
           field = this.renderEnumDropdown()
         } else {
           field = this.renderTextInput()