Skip to content

Commit

Permalink
fix(ui): slider (#1217)
Browse files Browse the repository at this point in the history
  • Loading branch information
dasein108 authored Jul 29, 2024
1 parent f36955f commit 27de60a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Slider/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ function Slider({
if (isHadleFocused && !draggingMode) {
return;
}
setDraggingMode(true);
setValueSilder(position);
requestAnimationFrame(() => {
const value = positionToPercents(position);
Expand Down Expand Up @@ -233,7 +234,7 @@ function Slider({
</>
)}
<button type="button" className={styles.buttonIcon}>
<img src={imgSwap} alt="swap" />
<img src={imgSwap} alt="swap" draggable="false" />
</button>
</div>
);
Expand All @@ -250,7 +251,7 @@ function Slider({
value={valueSilder}
min={scaleMin}
max={scaleMax}
step={0.1}
step={1}
handle={renderCustomHandle}
onChange={(pos) => onSliderChange(pos)}
marks={scaleMarks}
Expand Down

0 comments on commit 27de60a

Please sign in to comment.