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:
Chris-1010
2025-09-23 01:03:35 +01:00
parent 5f9d5b2bb2
commit 5a8bbcff57

View File

@@ -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]);