ResourcePickerList() — supabase Function Reference
Architecture documentation for the ResourcePickerList() function in SecondLevelNav.ResourcePicker.tsx from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/studio/components/interfaces/ProjectAPIDocs/SecondLevelNav.ResourcePicker.tsx lines 17–57
export const ResourcePickerList = ({
items,
emptyMessage,
selectedResource,
onSelect,
closePopover,
}: ResourcePickerListProps) => {
const handleSelect = (value: string) => {
onSelect(value)
closePopover()
}
return (
<Command_Shadcn_>
<CommandList_Shadcn_>
<CommandGroup_Shadcn_>
{items.length === 0 && (
<CommandItem_Shadcn_ disabled className="cursor-default px-4">
<p className="text-foreground-light">{emptyMessage}</p>
</CommandItem_Shadcn_>
)}
{items.map((item) => {
const isActive = item.name === selectedResource
return (
<CommandItem_Shadcn_
key={item.name}
className={cn(
'cursor-pointer px-4',
isActive ? 'text-foreground bg-selection' : 'text-foreground-light'
)}
onSelect={() => handleSelect(item.name)}
>
<p className="truncate">{item.name}</p>
</CommandItem_Shadcn_>
)
})}
</CommandGroup_Shadcn_>
</CommandList_Shadcn_>
</Command_Shadcn_>
)
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free