Browse Source

Merge pull request #272 from smiclea/enum-option

Fix options field rendering of empty 'enum' array
Dorin Paslaru 7 years ago
parent
commit
674f399b38

+ 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()