Home / Function/ ComboboxPopover() — ui Function Reference

ComboboxPopover() — ui Function Reference

Architecture documentation for the ComboboxPopover() function in combobox-popover.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  6051d63d_3826_8942_44b2_24716ee9f870["ComboboxPopover()"]
  8258220b_6595_eaa7_d689_b981a71ace0e["combobox-popover.tsx"]
  6051d63d_3826_8942_44b2_24716ee9f870 -->|defined in| 8258220b_6595_eaa7_d689_b981a71ace0e
  style 6051d63d_3826_8942_44b2_24716ee9f870 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/examples/combobox-popover.tsx lines 48–91

export default function ComboboxPopover() {
  const [open, setOpen] = React.useState(false)
  const [selectedStatus, setSelectedStatus] = React.useState<Status | null>(
    null
  )

  return (
    <div className="flex items-center space-x-4">
      <p className="text-sm text-muted-foreground">Status</p>
      <Popover open={open} onOpenChange={setOpen}>
        <PopoverTrigger asChild>
          <Button variant="outline" className="w-[150px] justify-start">
            {selectedStatus ? <>{selectedStatus.label}</> : <>+ Set status</>}
          </Button>
        </PopoverTrigger>
        <PopoverContent className="p-0" side="right" align="start">
          <Command>
            <CommandInput placeholder="Change status..." />
            <CommandList>
              <CommandEmpty>No results found.</CommandEmpty>
              <CommandGroup>
                {statuses.map((status) => (
                  <CommandItem
                    key={status.value}
                    value={status.value}
                    onSelect={(value) => {
                      setSelectedStatus(
                        statuses.find((priority) => priority.value === value) ||
                          null
                      )
                      setOpen(false)
                    }}
                  >
                    {status.label}
                  </CommandItem>
                ))}
              </CommandGroup>
            </CommandList>
          </Command>
        </PopoverContent>
      </Popover>
    </div>
  )
}

Subdomains

Frequently Asked Questions

What does ComboboxPopover() do?
ComboboxPopover() is a function in the ui codebase, defined in deprecated/www/registry/new-york/examples/combobox-popover.tsx.
Where is ComboboxPopover() defined?
ComboboxPopover() is defined in deprecated/www/registry/new-york/examples/combobox-popover.tsx at line 48.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free