mirror of
https://github.com/maputnik/editor.git
synced 2026-08-28 16:07:28 +00:00
Fixed default values for range slider.
This commit is contained in:
@@ -106,6 +106,8 @@ class NumberInput extends React.Component {
|
|||||||
this.props.min !== undefined && this.props.max !== undefined &&
|
this.props.min !== undefined && this.props.max !== undefined &&
|
||||||
this.props.allowRange
|
this.props.allowRange
|
||||||
) {
|
) {
|
||||||
|
const value = this.props.value === undefined ? this.props.default : this.props.value;
|
||||||
|
|
||||||
rangeEl = (
|
rangeEl = (
|
||||||
<input
|
<input
|
||||||
className="maputnik-number-range"
|
className="maputnik-number-range"
|
||||||
@@ -115,7 +117,7 @@ class NumberInput extends React.Component {
|
|||||||
min={this.props.min}
|
min={this.props.min}
|
||||||
step="any"
|
step="any"
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
value={this.state.value}
|
value={value}
|
||||||
onChange={this.onChangeRange}
|
onChange={this.onChangeRange}
|
||||||
onBlur={this.resetValue}
|
onBlur={this.resetValue}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user