Open combo box at last selected item
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
import { type WidgetLayout } from "$lib/stores/layoutStates";
|
||||
import { get, writable, type Writable } from "svelte/store";
|
||||
import { isDisabled } from "./utils"
|
||||
import { getSafetensorsMetadata } from '$lib/utils';
|
||||
import { clamp, getSafetensorsMetadata } from '$lib/utils';
|
||||
export let widget: WidgetLayout | null = null;
|
||||
export let isMobile: boolean = false;
|
||||
let node: ComfyComboNode | null = null;
|
||||
@@ -174,7 +174,7 @@
|
||||
itemCount={filteredItems.length}
|
||||
{itemSize}
|
||||
overscanCount={5}
|
||||
scrollToIndex={hoverItemIndex}>
|
||||
scrollToIndex={activeIndex != null ? clamp(activeIndex + itemsToShow - 1, 0, filteredItems.length-1) : hoverItemIndex}>
|
||||
<div slot="item"
|
||||
class="comfy-select-item"
|
||||
class:mobile={isMobile}
|
||||
|
||||
Reference in New Issue
Block a user