mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
Fixed date range calculations.
This commit is contained in:
parent
9f112c8cc9
commit
38abd673f3
8 changed files with 55 additions and 21 deletions
|
|
@ -9,13 +9,15 @@ export default function DropDown({ value, options = [], onChange }) {
|
|||
setShowMenu(state => !state);
|
||||
}
|
||||
|
||||
function handleSelect(value) {
|
||||
function handleSelect(value, e) {
|
||||
e.stopPropagation();
|
||||
setShowMenu(false);
|
||||
onChange(value);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
function hideMenu(e) {
|
||||
if (ref.current && !ref.current.contains(e.target)) {
|
||||
if (!ref.current.contains(e.target)) {
|
||||
setShowMenu(false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue