Function
ComboboxInput
({
className,
inputClassName,
children,
disabled = false,
showTrigger = true,
showClear = false,
...props
}: ComboboxPrimitive.Input.Props & {
inputClassName?: string;
showTrigger?: boolean;
showClear?: boolean;
})
Source from the content-addressed store, hash-verified
| 44 | } |
| 45 | |
| 46 | function ComboboxInput({ |
| 47 | className, |
| 48 | inputClassName, |
| 49 | children, |
| 50 | disabled = false, |
| 51 | showTrigger = true, |
| 52 | showClear = false, |
| 53 | ...props |
| 54 | }: ComboboxPrimitive.Input.Props & { |
| 55 | inputClassName?: string; |
| 56 | showTrigger?: boolean; |
| 57 | showClear?: boolean; |
| 58 | }) { |
| 59 | return ( |
| 60 | <InputGroup className={cn("w-auto", className)}> |
| 61 | <ComboboxPrimitive.Input |
| 62 | render={<InputGroupInput disabled={disabled} className={inputClassName} />} |
| 63 | {...props} |
| 64 | /> |
| 65 | <InputGroupAddon align="inline-end"> |
| 66 | {showTrigger && ( |
| 67 | <InputGroupButton |
| 68 | size="icon-xs" |
| 69 | variant="ghost" |
| 70 | asChild |
| 71 | data-slot="input-group-button" |
| 72 | className="group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent" |
| 73 | disabled={disabled} |
| 74 | > |
| 75 | <ComboboxTrigger /> |
| 76 | </InputGroupButton> |
| 77 | )} |
| 78 | {showClear && <ComboboxClear disabled={disabled} />} |
| 79 | </InputGroupAddon> |
| 80 | {children} |
| 81 | </InputGroup> |
| 82 | ); |
| 83 | } |
| 84 | |
| 85 | function ComboboxContent({ |
| 86 | className, |
Callers
nothing calls this directly
Tested by
no test coverage detected