Skip to content

Commit 8e04683

Browse files
committed
chore: ComboboxContent
1 parent e3e60d6 commit 8e04683

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

legacies/react/v2/components/primitives/combobox.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,22 @@ function ComboboxCommandInput(props: React.ComponentPropsWithRef<typeof CommandI
218218
return <CommandInput placeholder="Search item..." {...props} />
219219
}
220220

221+
/**
222+
* @description Composing of `Command` and `PopoverContent`
223+
* @argument commandProps —— props which will be passed to `Command` from `cmdk`
224+
*/
221225
function ComboboxContent({
222226
children,
223227
className,
228+
commandProps,
224229
...props
225-
}: { children?: React.ReactNode; className?: string } & React.ComponentPropsWithRef<
226-
typeof PopoverContent
227-
>) {
230+
}: {
231+
children?: React.ReactNode
232+
className?: string
233+
commandProps: React.ComponentPropsWithRef<typeof Command>
234+
} & React.ComponentPropsWithRef<typeof PopoverContent>) {
228235
return (
229-
<Command loop className="w-fit">
236+
<Command loop className="w-fit" {...commandProps}>
230237
<PopoverContent
231238
className={cn('w-(--radix-popover-trigger-width) bg-background p-0', className)}
232239
{...props}

0 commit comments

Comments
 (0)