{/if}
diff --git a/packages/bits-ui/src/lib/bits/select/components/select-scroll-down-button-mounted.svelte b/packages/bits-ui/src/lib/bits/select/components/select-scroll-down-button-mounted.svelte
index ef4c79795..94d926cc4 100644
--- a/packages/bits-ui/src/lib/bits/select/components/select-scroll-down-button-mounted.svelte
+++ b/packages/bits-ui/src/lib/bits/select/components/select-scroll-down-button-mounted.svelte
@@ -7,7 +7,6 @@
asChild,
children,
child,
- ref = $bindable(),
mounted,
...restProps
}: ScrollDownButtonProps & {
@@ -29,7 +28,7 @@
{#if asChild}
{@render child?.({ props: restProps })}
{:else}
-
+
{@render children?.()}
{/if}
diff --git a/packages/bits-ui/src/lib/bits/select/components/select-scroll-down-button.svelte b/packages/bits-ui/src/lib/bits/select/components/select-scroll-down-button.svelte
index 15462f129..7f1ac4bfc 100644
--- a/packages/bits-ui/src/lib/bits/select/components/select-scroll-down-button.svelte
+++ b/packages/bits-ui/src/lib/bits/select/components/select-scroll-down-button.svelte
@@ -6,13 +6,17 @@
import { useId } from "$lib/internal/useId.svelte.js";
import { mergeProps } from "$lib/internal/mergeProps.js";
- let { id = useId(), ref = $bindable(), ...restProps }: ScrollUpButtonProps = $props();
+ let { id = useId(), ref = $bindable(null), ...restProps }: ScrollUpButtonProps = $props();
const mounted = box(false);
const scrollDownButtonState = useSelectScrollDownButton({
id: box.with(() => id),
mounted: box.from(mounted),
+ ref: box.with(
+ () => ref,
+ (v) => (ref = v)
+ ),
});
// eslint-disable-next-line unused-imports/no-unused-vars, ts/no-unused-vars
@@ -23,5 +27,5 @@
{#if scrollDownButtonState.canScrollDown}
-
+
{/if}
diff --git a/packages/bits-ui/src/lib/bits/select/components/select-scroll-up-button-mounted.svelte b/packages/bits-ui/src/lib/bits/select/components/select-scroll-up-button-mounted.svelte
index 9c5987815..2261261ec 100644
--- a/packages/bits-ui/src/lib/bits/select/components/select-scroll-up-button-mounted.svelte
+++ b/packages/bits-ui/src/lib/bits/select/components/select-scroll-up-button-mounted.svelte
@@ -7,7 +7,6 @@
asChild,
children,
child,
- ref = $bindable(),
mounted,
...restProps
}: ScrollUpButtonProps & {
@@ -29,7 +28,7 @@
{#if asChild}
{@render child?.({ props: restProps })}
{:else}
-
+
{@render children?.()}
{/if}
diff --git a/packages/bits-ui/src/lib/bits/select/components/select-scroll-up-button.svelte b/packages/bits-ui/src/lib/bits/select/components/select-scroll-up-button.svelte
index ada1abbc9..5e54eacdf 100644
--- a/packages/bits-ui/src/lib/bits/select/components/select-scroll-up-button.svelte
+++ b/packages/bits-ui/src/lib/bits/select/components/select-scroll-up-button.svelte
@@ -6,13 +6,17 @@
import { useId } from "$lib/internal/useId.svelte.js";
import { mergeProps } from "$lib/internal/mergeProps.js";
- let { id = useId(), ref = $bindable(), ...restProps }: ScrollUpButtonProps = $props();
+ let { id = useId(), ref = $bindable(null), ...restProps }: ScrollUpButtonProps = $props();
const mounted = box(false);
const scrollUpButtonState = useSelectScrollUpButton({
id: box.with(() => id),
mounted: box.from(mounted),
+ ref: box.with(
+ () => ref,
+ (v) => (ref = v)
+ ),
});
// eslint-disable-next-line unused-imports/no-unused-vars, ts/no-unused-vars
@@ -23,5 +27,5 @@
{#if scrollUpButtonState.canScrollUp}
-
+
{/if}
diff --git a/packages/bits-ui/src/lib/bits/select/components/select-separator.svelte b/packages/bits-ui/src/lib/bits/select/components/select-separator.svelte
index 4caa98001..e2f269d4b 100644
--- a/packages/bits-ui/src/lib/bits/select/components/select-separator.svelte
+++ b/packages/bits-ui/src/lib/bits/select/components/select-separator.svelte
@@ -2,10 +2,25 @@
import type { SeparatorProps } from "../index.js";
import { useSelectSeparator } from "../select.svelte.js";
import { mergeProps } from "$lib/internal/mergeProps.js";
+ import { useId } from "$lib/internal/useId.svelte.js";
+ import { box } from "svelte-toolbelt";
- let { asChild, child, children, ref = $bindable(), ...restProps }: SeparatorProps = $props();
+ let {
+ asChild,
+ child,
+ children,
+ id = useId(),
+ ref = $bindable(null),
+ ...restProps
+ }: SeparatorProps = $props();
- const separatorState = useSelectSeparator();
+ const separatorState = useSelectSeparator({
+ id: box.with(() => id),
+ ref: box.with(
+ () => ref,
+ (v) => (ref = v)
+ ),
+ });
const mergedProps = $derived(mergeProps(restProps, separatorState.props));
@@ -13,7 +28,7 @@
{#if asChild}
{@render child?.({ props: mergedProps })}
{:else}
-
+
{@render children?.()}
{/if}
diff --git a/packages/bits-ui/src/lib/bits/select/components/select-trigger.svelte b/packages/bits-ui/src/lib/bits/select/components/select-trigger.svelte
index f5a8fa797..895b484a9 100644
--- a/packages/bits-ui/src/lib/bits/select/components/select-trigger.svelte
+++ b/packages/bits-ui/src/lib/bits/select/components/select-trigger.svelte
@@ -9,7 +9,7 @@
let {
id = useId(),
disabled = false,
- ref = $bindable(),
+ ref = $bindable(null),
asChild,
children,
child,
@@ -19,6 +19,10 @@
const triggerState = useSelectTrigger({
id: box.with(() => id),
disabled: box.with(() => disabled),
+ ref: box.with(
+ () => ref,
+ (v) => (ref = v)
+ ),
});
const mergedProps = $derived(mergeProps(restProps, triggerState.props));
@@ -28,7 +32,7 @@
{#if asChild}
{@render child?.({ props: mergedProps })}
{:else}
-