Home / Function/ AssignIssue() — ui Function Reference

AssignIssue() — ui Function Reference

Architecture documentation for the AssignIssue() function in github.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  7881df67_e50f_30f7_64a3_a177a112c5e1["AssignIssue()"]
  ea47a897_f8a1_c141_0a31_7faa4e84543e["github.tsx"]
  7881df67_e50f_30f7_64a3_a177a112c5e1 -->|defined in| ea47a897_f8a1_c141_0a31_7faa4e84543e
  style 7881df67_e50f_30f7_64a3_a177a112c5e1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/base/blocks/github.tsx lines 1307–1388

function AssignIssue() {
  const anchor = useComboboxAnchor()
  return (
    <Example title="User Select" className="items-center justify-center">
      <Card className="w-full max-w-sm" size="sm">
        <CardHeader className="border-b">
          <CardTitle className="text-sm">Assign Issue</CardTitle>
          <CardDescription className="text-sm">
            Select users to assign to this issue.
          </CardDescription>
          <CardAction>
            <Tooltip>
              <TooltipTrigger
                render={<Button variant="outline" size="icon-xs" />}
              >
                <IconPlaceholder
                  lucide="PlusIcon"
                  tabler="IconPlus"
                  hugeicons="PlusSignIcon"
                  phosphor="PlusIcon"
                  remixicon="RiAddLine"
                />
              </TooltipTrigger>
              <TooltipContent>Add user</TooltipContent>
            </Tooltip>
          </CardAction>
        </CardHeader>
        <CardContent>
          <Combobox
            multiple
            autoHighlight
            items={users}
            defaultValue={[users[0]]}
          >
            <ComboboxChips ref={anchor}>
              <ComboboxValue>
                {(values) => (
                  <React.Fragment>
                    {values.map((username: string) => (
                      <ComboboxChip key={username}>
                        <Avatar className="size-4">
                          <AvatarImage
                            src={`https://github.com/${username}.png`}
                            alt={username}
                          />
                          <AvatarFallback>{username.charAt(0)}</AvatarFallback>
                        </Avatar>
                        {username}
                      </ComboboxChip>
                    ))}
                    <ComboboxChipsInput
                      placeholder={
                        values.length > 0 ? undefined : "Select a item..."
                      }
                    />
                  </React.Fragment>
                )}
              </ComboboxValue>
            </ComboboxChips>
            <ComboboxContent anchor={anchor}>
              <ComboboxEmpty>No users found.</ComboboxEmpty>
              <ComboboxList>
                {(username) => (
                  <ComboboxItem key={username} value={username}>
                    <Avatar className="size-5">
                      <AvatarImage
                        src={`https://github.com/${username}.png`}
                        alt={username}
                      />
                      <AvatarFallback>{username.charAt(0)}</AvatarFallback>
                    </Avatar>
                    {username}
                  </ComboboxItem>
                )}
              </ComboboxList>
            </ComboboxContent>
          </Combobox>
        </CardContent>
      </Card>
    </Example>
  )

Subdomains

Frequently Asked Questions

What does AssignIssue() do?
AssignIssue() is a function in the ui codebase, defined in apps/v4/registry/bases/base/blocks/github.tsx.
Where is AssignIssue() defined?
AssignIssue() is defined in apps/v4/registry/bases/base/blocks/github.tsx at line 1307.

Analyze Your Own Codebase

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

Try Supermodel Free