Add default value for RangeSlider in StatView
Set `RangeSlider` values to min and max upon initial load The app was doing this before anyway, it was just not displaying it on the slider
This commit is contained in:
@@ -82,6 +82,7 @@ const StatView = () => {
|
|||||||
min={0}
|
min={0}
|
||||||
max={getDaysBetween(firstStreamDate, lastStreamDate)}
|
max={getDaysBetween(firstStreamDate, lastStreamDate)}
|
||||||
step={1}
|
step={1}
|
||||||
|
defaultValue={[0, getDaysBetween(firstStreamDate, lastStreamDate)]} // This bad boy right here
|
||||||
onInput={(value) => {
|
onInput={(value) => {
|
||||||
const startDate = getDaysAfter(firstStreamDate, value[0]);
|
const startDate = getDaysAfter(firstStreamDate, value[0]);
|
||||||
const endDate = getDaysAfter(firstStreamDate, value[1]);
|
const endDate = getDaysAfter(firstStreamDate, value[1]);
|
||||||
|
|||||||
Reference in New Issue
Block a user