fix: context-lenght-value (#3854)

This commit is contained in:
Faisal Amir 2024-10-21 22:20:10 +07:00 committed by GitHub
parent e2d9533e79
commit 6b4e556a7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -25,6 +25,7 @@ const SettingComponent: React.FC<Props> = ({
case 'slider': {
const { min, max, step, value } =
data.controllerProps as SliderComponentProps
return (
<SliderRightPanel
key={data.key}

View File

@ -1,4 +1,4 @@
import { useState } from 'react'
import { useEffect, useState } from 'react'
import { Slider, Input, Tooltip } from '@janhq/joi'
@ -32,6 +32,10 @@ const SliderRightPanel = ({
useClickOutside(() => setShowTooltip({ max: false, min: false }), null, [])
useEffect(() => {
setVal(value.toString())
}, [value])
return (
<div className="flex flex-col">
<div className="mb-3 flex items-center gap-x-2">