mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 17:11:17 +01:00
Fixed default values for range slider.
This commit is contained in:
parent
8a8cfad303
commit
5053058c32
1 changed files with 3 additions and 1 deletions
|
@ -106,6 +106,8 @@ class NumberInput extends React.Component {
|
|||
this.props.min !== undefined && this.props.max !== undefined &&
|
||||
this.props.allowRange
|
||||
) {
|
||||
const value = this.props.value === undefined ? this.props.default : this.props.value;
|
||||
|
||||
rangeEl = (
|
||||
<input
|
||||
className="maputnik-number-range"
|
||||
|
@ -115,7 +117,7 @@ class NumberInput extends React.Component {
|
|||
min={this.props.min}
|
||||
step="any"
|
||||
spellCheck="false"
|
||||
value={this.state.value}
|
||||
value={value}
|
||||
onChange={this.onChangeRange}
|
||||
onBlur={this.resetValue}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue