fix height combobox (virtual list)
This commit is contained in:
@@ -121,7 +121,12 @@ export function ComboboxAdvanced({
|
||||
value={inputValue}
|
||||
onValueChange={setInputValue}
|
||||
/>
|
||||
<VirtualList height={300} data={data} itemHeight={32} itemKey="value">
|
||||
<VirtualList
|
||||
height={Math.min(items.length * 32, 300)}
|
||||
data={data}
|
||||
itemHeight={32}
|
||||
itemKey="value"
|
||||
>
|
||||
{renderItem}
|
||||
</VirtualList>
|
||||
</Command>
|
||||
|
||||
@@ -124,7 +124,7 @@ export function Combobox<T extends string>({
|
||||
<CommandEmpty>Nothing selected</CommandEmpty>
|
||||
)}
|
||||
<VirtualList
|
||||
height={300}
|
||||
height={Math.min(items.length * 32, 300)}
|
||||
data={items.filter((item) => {
|
||||
if (search === '') return true;
|
||||
return item.label.toLowerCase().includes(search.toLowerCase());
|
||||
|
||||
Reference in New Issue
Block a user