fix: remove double scrollbar in model selector by using Bits UI content available height

This commit is contained in:
Pascal 2026-01-07 11:46:14 +01:00
parent 2d6020b574
commit 4c095df509
2 changed files with 1 additions and 5 deletions

View File

@ -21,8 +21,6 @@
align?: 'start' | 'center' | 'end';
/** Content width class */
contentClass?: string;
/** Max height for the list area */
listMaxHeight?: string;
/** Empty state message */
emptyMessage?: string;
/** Whether to show empty state */
@ -46,7 +44,6 @@
onSearchKeyDown,
align = 'start',
contentClass = 'w-72',
listMaxHeight = 'max-h-48',
emptyMessage = 'No items found',
isEmpty = false,
disabled = false,
@ -80,7 +77,7 @@
/>
</div>
<div class={cn('overflow-y-auto', listMaxHeight)}>
<div class={cn('overflow-y-auto', 'max-h-[--bits-dropdown-menu-content-available-height]')}>
{@render children()}
{#if isEmpty}
<div class="px-2 py-3 text-center text-sm text-muted-foreground">{emptyMessage}</div>

View File

@ -348,7 +348,6 @@
onSearchKeyDown={handleSearchKeyDown}
align="end"
contentClass="w-96 max-w-[calc(100vw-2rem)]"
listMaxHeight="max-h-[50dvh]"
emptyMessage="No models found."
isEmpty={filteredOptions.length === 0 && isCurrentModelInCache()}
disabled={disabled || updating}