diff --git a/src/components/inputs/DynamicArrayInput.jsx b/src/components/inputs/DynamicArrayInput.jsx index 84d6bb9..9fa05c6 100644 --- a/src/components/inputs/DynamicArrayInput.jsx +++ b/src/components/inputs/DynamicArrayInput.jsx @@ -7,6 +7,7 @@ import {MdDelete} from 'react-icons/md' import DocLabel from '../fields/DocLabel' import EnumInput from '../inputs/SelectInput' import capitalize from 'lodash.capitalize' +import UrlInput from '../inputs/UrlInput' class DynamicArrayInput extends React.Component { @@ -35,6 +36,9 @@ class DynamicArrayInput extends React.Component { if (this.props.type === 'number') { values.push(0) } + else if (this.props.type === 'url') { + values.push(""); + } else if (this.props.type === 'enum') { const {fieldSpec} = this.props; const defaultValue = Object.keys(fieldSpec.values)[0]; @@ -57,7 +61,13 @@ class DynamicArrayInput extends React.Component { const inputs = this.values.map((v, i) => { const deleteValueBtn= let input; - if (this.props.type === 'number') { + if(this.props.type === 'url') { + input = + } + else if (this.props.type === 'number') { input = { - return - - - }) + const tiles = this.props.source.tiles || []; + return + + } render() { @@ -108,7 +104,7 @@ class ImageSourceEditor extends React.Component { } return
- + this.props.onChange({ @@ -159,7 +155,7 @@ class VideoSourceEditor extends React.Component { } return
- +