diff --git a/CHANGELOG.md b/CHANGELOG.md index 118826f0a..c8574f63b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ All notable changes to this project will be documented in this file. - Allow custom event timeseries in stats API plausible/analytics#3505 - Fixes for sites with UTF characters in domain plausible/analytics#3560 - Fix crash when using special characters in filter plausible/analytics#3634 +- Fix automatic scrolling to the bottom on the dashboard if previously selected properties tab plausible/analytics#3872 - Allow running the container with arbitrary UID plausible/analytics#2986 ## v2.0.0 - 2023-07-12 diff --git a/assets/js/dashboard/components/combobox.js b/assets/js/dashboard/components/combobox.js index ffc92ba3f..a5268f75e 100644 --- a/assets/js/dashboard/components/combobox.js +++ b/assets/js/dashboard/components/combobox.js @@ -159,10 +159,10 @@ export default function PlausibleCombobox(props) { }, []) useEffect(() => { - if (props.singleOption && props.values.length === 0) { + if (props.singleOption && props.values.length === 0 && props.autoFocus) { searchRef.current.focus() } - }, [props.values.length === 0]) + }, [props.values.length === 0, props.singleOption, props.autoFocus]) const searchBoxClass = 'border-none py-1 px-0 w-full inline-block rounded-md focus:outline-none focus:ring-0 text-sm' diff --git a/assets/js/dashboard/stats/modals/prop-filter-row.js b/assets/js/dashboard/stats/modals/prop-filter-row.js index cc2069fe9..fae520446 100644 --- a/assets/js/dashboard/stats/modals/prop-filter-row.js +++ b/assets/js/dashboard/stats/modals/prop-filter-row.js @@ -46,7 +46,8 @@ function PropFilterRow({ onPropKeySelect(id, value)} placeholder={'Property'}