Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

fix dropdown maxheight

Francis Cao9fc3fa8d8751
diff --git a/src/app/(main)/settings/preferences/LanguageSetting.tsx b/src/app/(main)/settings/preferences/LanguageSetting.tsx
index 34470c36c..51c3940ae 100644
--- a/src/app/(main)/settings/preferences/LanguageSetting.tsx
+++ b/src/app/(main)/settings/preferences/LanguageSetting.tsx
@@ -33,7 +33,7 @@ export function LanguageSetting() {
allowSearch
onSearch={setSearch}
onOpenChange={handleOpen}
- listProps={{ style: { maxHeight: 300 } }}
+ maxHeight={480}
style={{ minWidth: '250px' }}
>
{items.map(item => (
diff --git a/src/app/(main)/settings/preferences/TimezoneSetting.tsx b/src/app/(main)/settings/preferences/TimezoneSetting.tsx
index f206a6e4f..765d37608 100644
--- a/src/app/(main)/settings/preferences/TimezoneSetting.tsx
+++ b/src/app/(main)/settings/preferences/TimezoneSetting.tsx
@@ -29,7 +29,7 @@ export function TimezoneSetting() {
allowSearch={true}
onSearch={setSearch}
onOpenChange={handleOpen}
- listProps={{ style: { maxHeight: 300 } }}
+ maxHeight={480}
style={{ minWidth: '250px' }}
>
{items.map((item: any) => (
diff --git a/src/app/(main)/websites/[websiteId]/compare/CompareTables.tsx b/src/app/(main)/websites/[websiteId]/compare/CompareTables.tsx
index 3a07f9e66..683dcd493 100644
--- a/src/app/(main)/websites/[websiteId]/compare/CompareTables.tsx
+++ b/src/app/(main)/websites/[websiteId]/compare/CompareTables.tsx
@@ -154,10 +154,9 @@ export function CompareTables({ websiteId }: { websiteId: string }) {
<Select
label={t(labels.compare)}
value={view}
- defaultValue={view}
onChange={handleChange}
- style={{ width: 200 }}
- popoverProps={{ style: { width: 200 } }}
+ maxHeight={480}
+ listProps={{ style: { width: 200 } }}
>
{items.map(({ id, label }) => (
<ListItem key={id} id={id}>
diff --git a/src/app/(main)/websites/[websiteId]/events/EventProperties.tsx b/src/app/(main)/websites/[websiteId]/events/EventProperties.tsx
index 0c03c0f52..f6178b28c 100644
--- a/src/app/(main)/websites/[websiteId]/events/EventProperties.tsx
+++ b/src/app/(main)/websites/[websiteId]/events/EventProperties.tsx
@@ -42,6 +42,7 @@ export function EventProperties({ websiteId }: { websiteId: string }) {
value={eventName}
onChange={setEventName}
placeholder=""
+ maxHeight={480}
>
{events?.map(p => (
<ListItem key={p} id={p}>
@@ -55,6 +56,7 @@ export function EventProperties({ websiteId }: { websiteId: string }) {
onChange={setPropertyName}
isDisabled={!eventName}
placeholder=""
+ maxHeight={480}
>
{properties?.map(p => (
<ListItem key={p} id={p}>
diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionProperties.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionProperties.tsx
index 6d21750ac..f6377edb3 100644
--- a/src/app/(main)/websites/[websiteId]/sessions/SessionProperties.tsx
+++ b/src/app/(main)/websites/[websiteId]/sessions/SessionProperties.tsx
@@ -33,6 +33,7 @@ export function SessionProperties({ websiteId }: { websiteId: string }) {
value={propertyName}
onChange={setPropertyName}
placeholder=""
+ maxHeight={480}
>
{properties?.map(p => (
<ListItem key={p} id={p}>
diff --git a/src/components/input/BoardSelect.tsx b/src/components/input/BoardSelect.tsx
index b8fbf3a6a..ac04f5429 100644
--- a/src/components/input/BoardSelect.tsx
+++ b/src/components/input/BoardSelect.tsx
@@ -72,12 +72,12 @@ export function BoardSelect({
...buttonProps?.style,
},
}}
+ maxHeight={480}
listProps={{
...listProps,
renderEmptyState:
listProps?.renderEmptyState || (() => <Empty message={t(messages.noResultsFound)} />),
style: {
- maxHeight: 'calc(42vh - 65px)',
width: 280,
...listProps?.style,
},
diff --git a/src/components/input/CurrencySelect.tsx b/src/components/input/CurrencySelect.tsx
index 8bad9821c..3f4a870c2 100644
--- a/src/components/input/CurrencySelect.tsx
+++ b/src/components/input/CurrencySelect.tsx
@@ -13,7 +13,7 @@ export function CurrencySelect({ value, onChange }) {
value={value}
defaultValue={value}
onChange={onChange}
- listProps={{ style: { maxHeight: 300 } }}
+ maxHeight={480}
onSearch={setSearch}
allowSearch
>
diff --git a/src/components/input/LinkSelect.tsx b/src/components/input/LinkSelect.tsx
index 34c864e08..dc041bd02 100644
--- a/src/components/input/LinkSelect.tsx
+++ b/src/components/input/LinkSelect.tsx
@@ -76,12 +76,12 @@ export function LinkSelect({
...buttonProps?.style,
},
}}
+ maxHeight={480}
listProps={{
...listProps,
renderEmptyState:
listProps?.renderEmptyState || (() => <Empty message={t(messages.noResultsFound)} />),
style: {
- maxHeight: 'calc(42vh - 65px)',
width: 280,
...listProps?.style,
},
diff --git a/src/components/input/PixelSelect.tsx b/src/components/input/PixelSelect.tsx
index 5ad68f307..c2ba711b4 100644
--- a/src/components/input/PixelSelect.tsx
+++ b/src/components/input/PixelSelect.tsx
@@ -76,12 +76,12 @@ export function PixelSelect({
...buttonProps?.style,
},
}}
+ maxHeight={480}
listProps={{
...listProps,
renderEmptyState:
listProps?.renderEmptyState || (() => <Empty message={t(messages.noResultsFound)} />),
style: {
- maxHeight: 'calc(42vh - 65px)',
width: 280,
...listProps?.style,
},
diff --git a/src/components/input/UserSelect.tsx b/src/components/input/UserSelect.tsx
index bd3a766a7..65e6689fe 100644
--- a/src/components/input/UserSelect.tsx
+++ b/src/components/input/UserSelect.tsx
@@ -50,9 +50,9 @@ export function UserSelect({
onSearch={handleSearch}
onChange={handleChange}
onOpenChange={handleOpenChange}
+ maxHeight={480}
listProps={{
renderEmptyState: () => <Empty message={t(messages.noResultsFound)} />,
- style: { maxHeight: 'calc(42vh - 65px)' },
}}
>
{listItems.map(({ id, username }) => (
diff --git a/src/components/input/WebsiteSelect.tsx b/src/components/input/WebsiteSelect.tsx
index 3fd28cdd2..90d374f19 100644
--- a/src/components/input/WebsiteSelect.tsx
+++ b/src/components/input/WebsiteSelect.tsx
@@ -91,12 +91,12 @@ export function WebsiteSelect({
...buttonProps?.style,
},
}}
+ maxHeight={480}
listProps={{
...listProps,
renderEmptyState:
listProps?.renderEmptyState || (() => <Empty message={t(messages.noResultsFound)} />),
style: {
- maxHeight: 'calc(42vh - 65px)',
width: 280,
...listProps?.style,
},