Skip to content

Commit

Permalink
Fetch 200 projects for the top bar project picker instead of 20 (#1839)
Browse files Browse the repository at this point in the history
fetch 200 projects for the top bar project picker instead of 20
  • Loading branch information
david-crespo authored Dec 7, 2023
1 parent ce09b54 commit 1802c28
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/components/TopBarPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ const TopBarPicker = (props: TopBarPickerProps) => {
// portal is necessary to avoid the menu popover getting its own after:
// separator thing
<DropdownMenu.Portal>
<DropdownMenu.Content className="mt-2 min-w-[12.8125rem]" align="start">
<DropdownMenu.Content
className="mt-2 max-h-80 min-w-[12.8125rem] overflow-y-auto"
align="start"
>
{props.items.length > 0 ? (
props.items.map(({ label, to }) => {
const isSelected = props.current === label
Expand Down Expand Up @@ -232,7 +235,7 @@ const NoProjectLogo = () => (
)

export function ProjectPicker({ project }: { project?: Project }) {
const { data: projects } = useApiQuery('projectList', { query: { limit: 20 } })
const { data: projects } = useApiQuery('projectList', { query: { limit: 200 } })
const items = (projects?.items || []).map(({ name }) => ({
label: name,
to: pb.instances({ project: name }),
Expand Down

0 comments on commit 1802c28

Please sign in to comment.