diff --git a/src/components/inputs/NumberInput.jsx b/src/components/inputs/NumberInput.jsx index 75ed148..e4fb221 100644 --- a/src/components/inputs/NumberInput.jsx +++ b/src/components/inputs/NumberInput.jsx @@ -68,14 +68,42 @@ class NumberInput extends React.Component { } render() { - return this.changeValue(e.target.value)} - onBlur={this.resetValue} - /> + let rangeEl; + + if( + this.props.hasOwnProperty("min") && this.props.hasOwnProperty("max") && + this.props.min !== undefined && this.props.max !== undefined && + this.props.allowRange + ) { + rangeEl = ( + this.changeValue(e.target.value)} + onBlur={this.resetValue} + /> + ); + } + + return
+ {rangeEl} + this.changeValue(e.target.value)} + onBlur={this.resetValue} + /> +
} } diff --git a/src/components/layers/MaxZoomBlock.jsx b/src/components/layers/MaxZoomBlock.jsx index b4ab33e..7447593 100644 --- a/src/components/layers/MaxZoomBlock.jsx +++ b/src/components/layers/MaxZoomBlock.jsx @@ -16,6 +16,7 @@ class MaxZoomBlock extends React.Component { data-wd-key="max-zoom" >