mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-13 06:35:24 +03:00
Fix NaN for score selector
This commit is contained in:
parent
d836a21213
commit
e16cb6e018
@ -494,12 +494,16 @@ function PlusFilterGroup({
|
|||||||
className="w-12"
|
className="w-12"
|
||||||
inputMode="numeric"
|
inputMode="numeric"
|
||||||
value={Math.round((currentScoreRange?.at(0) ?? 0.5) * 100)}
|
value={Math.round((currentScoreRange?.at(0) ?? 0.5) * 100)}
|
||||||
onChange={(e) =>
|
onChange={(e) => {
|
||||||
setCurrentScoreRange([
|
const value = e.target.value;
|
||||||
parseInt(e.target.value) / 100.0,
|
|
||||||
currentScoreRange?.at(1) ?? 1.0,
|
if (value) {
|
||||||
])
|
setCurrentScoreRange([
|
||||||
}
|
parseInt(value) / 100.0,
|
||||||
|
currentScoreRange?.at(1) ?? 1.0,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<DualThumbSlider
|
<DualThumbSlider
|
||||||
className="w-full"
|
className="w-full"
|
||||||
@ -513,12 +517,16 @@ function PlusFilterGroup({
|
|||||||
className="w-12"
|
className="w-12"
|
||||||
inputMode="numeric"
|
inputMode="numeric"
|
||||||
value={Math.round((currentScoreRange?.at(1) ?? 1.0) * 100)}
|
value={Math.round((currentScoreRange?.at(1) ?? 1.0) * 100)}
|
||||||
onChange={(e) =>
|
onChange={(e) => {
|
||||||
setCurrentScoreRange([
|
const value = e.target.value;
|
||||||
currentScoreRange?.at(0) ?? 0.5,
|
|
||||||
parseInt(e.target.value) / 100.0,
|
if (value) {
|
||||||
])
|
setCurrentScoreRange([
|
||||||
}
|
currentScoreRange?.at(0) ?? 0.5,
|
||||||
|
parseInt(value) / 100.0,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user