Skip to content

Commit

Permalink
fix(rangeInput): clear input when refinement is cleared (#4429)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunjae Lee authored Jun 9, 2020
1 parent 0c75437 commit a2c7663
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/RangeInput/RangeInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class RangeInput extends Component {
min={min}
max={max}
step={step}
value={minValue}
value={minValue ?? ''}
onInput={this.onInput('min')}
placeholder={min}
disabled={isDisabled}
Expand All @@ -81,7 +81,7 @@ class RangeInput extends Component {
min={min}
max={max}
step={step}
value={maxValue}
value={maxValue ?? ''}
onInput={this.onInput('max')}
placeholder={max}
disabled={isDisabled}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ exports[`RangeInput expect to render 1`] = `
placeholder={0}
step={1}
type="number"
value=""
/>
</label>
<Template
Expand Down Expand Up @@ -52,6 +53,7 @@ exports[`RangeInput expect to render 1`] = `
placeholder={500}
step={1}
type="number"
value=""
/>
</label>
<Template
Expand Down Expand Up @@ -98,6 +100,7 @@ exports[`RangeInput expect to render with disabled state 1`] = `
placeholder={480}
step={1}
type="number"
value=""
/>
</label>
<Template
Expand Down Expand Up @@ -130,6 +133,7 @@ exports[`RangeInput expect to render with disabled state 1`] = `
placeholder={20}
step={1}
type="number"
value=""
/>
</label>
<Template
Expand Down Expand Up @@ -256,6 +260,7 @@ exports[`RangeInput willReceiveProps expect to update the empty state from given
placeholder={0}
step={1}
type="number"
value=""
/>
</label>
<Template
Expand Down Expand Up @@ -288,6 +293,7 @@ exports[`RangeInput willReceiveProps expect to update the empty state from given
placeholder={500}
step={1}
type="number"
value=""
/>
</label>
<Template
Expand Down

0 comments on commit a2c7663

Please sign in to comment.