🐛 fix: Added a scroll wheel event handler to improve the scrolling experience of the combo box option list.

This commit is contained in:
web 2025-12-16 06:52:39 -08:00
parent 25d95c792f
commit 76481755ea

View File

@ -103,7 +103,11 @@ export function Combobox<T, M extends boolean = false>({
<BoxIcon className="inline-block text-slate-500" /> <BoxIcon className="inline-block text-slate-500" />
</CommandEmpty> </CommandEmpty>
<CommandGroup> <CommandGroup>
<CommandList> <CommandList
onWheel={(e) => {
e.currentTarget.scrollTop += e.deltaY;
}}
>
{options.map((option) => ( {options.map((option) => (
<CommandItem <CommandItem
key={String(option.label + option.value)} key={String(option.label + option.value)}