mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 09:35:25 +01:00
Removed placeholder on range (doesn't work) in favour 'default' value merged into 'value'.
This commit is contained in:
parent
c58ae0f895
commit
d5d387f349
1 changed files with 2 additions and 2 deletions
|
@ -150,6 +150,7 @@ class NumberInput extends React.Component {
|
||||||
this.props.allowRange
|
this.props.allowRange
|
||||||
) {
|
) {
|
||||||
const value = this.state.editing ? this.state.dirtyValue : this.state.value;
|
const value = this.state.editing ? this.state.dirtyValue : this.state.value;
|
||||||
|
const defaultValue = this.props.default === undefined ? "" : this.props.default;
|
||||||
let inputValue;
|
let inputValue;
|
||||||
if (this.state.editingRange) {
|
if (this.state.editingRange) {
|
||||||
inputValue = this.state.value;
|
inputValue = this.state.value;
|
||||||
|
@ -167,8 +168,7 @@ class NumberInput extends React.Component {
|
||||||
min={this.props.min}
|
min={this.props.min}
|
||||||
step="any"
|
step="any"
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
placeholder={this.props.default}
|
value={value === undefined ? defaultValue : value}
|
||||||
value={value === undefined ? "" : value}
|
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
onChange={this.onChangeRange}
|
onChange={this.onChangeRange}
|
||||||
onKeyDown={() => {
|
onKeyDown={() => {
|
||||||
|
|
Loading…
Reference in a new issue