File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
src/lib/components/slider Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ description: All notable changes will be documented in this file.
1414
1515### Fixed
1616
17+ - ** Slider** : Fixed ` Slider.ValueText ` not displaying default value when no children provided
1718- ** Combobox** :
1819 - Fixed focus stealing in controlled open mode
1920 - Removed problematic ` aria-hidden ` behavior to allow interaction with other page elements
Original file line number Diff line number Diff line change 11<script module lang =" ts" >
2+ import type { Snippet } from ' svelte'
23 import type { HTMLProps , PolymorphicProps , RefAttribute } from ' $lib/types'
34
4- export interface SliderValueTextBaseProps extends PolymorphicProps <' div' >, RefAttribute {}
5+ export interface SliderValueTextBaseProps extends PolymorphicProps <' div' >, RefAttribute {
6+ children? : Snippet
7+ }
58 export interface SliderValueTextProps extends HTMLProps <' div' >, SliderValueTextBaseProps {}
69 </script >
710
1013 import { Ark } from ' ../factory'
1114 import { useSliderContext } from ' ./use-slider-context'
1215
13- let { ref = $bindable (null ), ... props }: SliderValueTextProps = $props ()
16+ let { ref = $bindable (null ), children, ... props }: SliderValueTextProps = $props ()
1417 const slider = useSliderContext ()
1518 const mergedProps = $derived (mergeProps (slider ().getValueTextProps (), props ))
1619 </script >
1720
18- <Ark as ="div" bind:ref {...mergedProps } />
21+ <Ark as ="div" bind:ref {...mergedProps }>
22+ {#if children }
23+ {@render children ()}
24+ {:else }
25+ {slider ().value .join (' , ' )}
26+ {/if }
27+ </Ark >
You can’t perform that action at this time.
0 commit comments