261020_01_ENH: kri-auto-complete 검색 시 옵션 목록 스크롤 초기화 옵션 추가

This commit is contained in:
2026-10-20 15:00:07 +09:00
parent 4bcc339c51
commit 487302d374
9 changed files with 55 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
import type { HTMLAttributes, InputHTMLAttributes } from "react";
import { forwardRef } from "react";
import { cn } from "@/lib/utils";
export interface CommandProps extends HTMLAttributes<HTMLDivElement> {
@@ -26,9 +27,11 @@ export function CommandInput({ className, onValueChange, onChange, ...props }: C
);
}
export function CommandList({ className, ...props }: HTMLAttributes<HTMLDivElement>) {
return <div className={cn(className)} {...props} />;
}
export const CommandList = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
function CommandList({ className, ...props }, ref) {
return <div ref={ref} className={cn(className)} {...props} />;
},
);
export function CommandEmpty({ className, ...props }: HTMLAttributes<HTMLDivElement>) {
return <div className={cn(className)} {...props} />;