🐛 fix: Added a scroll wheel event handler to improve the scrolling experience of the combo box option list.
This commit is contained in:
parent
25d95c792f
commit
76481755ea
@ -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)}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user