mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
remove event filter for non-event pages
This commit is contained in:
parent
a1a092dc19
commit
57eef5866b
1 changed files with 6 additions and 1 deletions
|
|
@ -22,6 +22,7 @@ export function FilterEditForm({ websiteId, onChange, onClose }: FilterEditFormP
|
|||
const [currentCohort, setCurrentCohort] = useState(cohort);
|
||||
const { isMobile } = useMobile();
|
||||
const excludeFilters = pathname.includes('/pixels') || pathname.includes('/links');
|
||||
const excludeEvent = !pathname.endsWith('/events');
|
||||
|
||||
const handleReset = () => {
|
||||
setCurrentFilters([]);
|
||||
|
|
@ -62,7 +63,11 @@ export function FilterEditForm({ websiteId, onChange, onClose }: FilterEditFormP
|
|||
value={currentFilters}
|
||||
onChange={setCurrentFilters}
|
||||
exclude={
|
||||
excludeFilters ? ['path', 'title', 'hostname', 'distinctId', 'tag', 'event'] : []
|
||||
excludeFilters
|
||||
? ['path', 'title', 'hostname', 'distinctId', 'tag', 'event']
|
||||
: excludeEvent
|
||||
? ['event']
|
||||
: []
|
||||
}
|
||||
/>
|
||||
</TabPanel>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue