mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
scroll to last element, not first
This commit is contained in:
parent
38df2d23b6
commit
1dcb12fa6f
@ -51,7 +51,7 @@ const TimePicker = ({ dateRange, onChange }) => {
|
||||
* and if that element is present, it will scroll into view if needed
|
||||
*/
|
||||
if (timeRange.size > 1) {
|
||||
const element = document.getElementById(`timeIndex-${Math.min(...timeRange)}`);
|
||||
const element = document.getElementById(`timeIndex-${Math.max(...timeRange)}`);
|
||||
if (element) {
|
||||
element.scrollIntoViewIfNeeded(true);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user