mirror of
https://github.com/langgenius/dify.git
synced 2026-04-09 09:00:31 -04:00
fix(web): avoid prehydration script in slider (#34676)
This commit is contained in:
@@ -70,4 +70,10 @@ describe('Slider', () => {
|
||||
const sliderWrapper = container.querySelector('.outer-test')
|
||||
expect(sliderWrapper).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('should not render prehydration script tags', () => {
|
||||
const { container } = render(<Slider value={10} onValueChange={vi.fn()} aria-label="Value" />)
|
||||
|
||||
expect(container.querySelector('script')).not.toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -82,7 +82,7 @@ export function Slider({
|
||||
step={step}
|
||||
disabled={disabled}
|
||||
name={name}
|
||||
thumbAlignment="edge"
|
||||
thumbAlignment="edge-client-only"
|
||||
className={cn(sliderRootClassName, className)}
|
||||
>
|
||||
<BaseSlider.Control className={sliderControlClassName}>
|
||||
|
||||
Reference in New Issue
Block a user