Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Add dragging to useLayoutEffect dependency array in Slider and add sl… #226

Merged
merged 2 commits into from
Feb 13, 2023

Conversation

juliewongbandue
Copy link
Collaborator

@juliewongbandue juliewongbandue commented Feb 13, 2023

What this PR does

  • Adds dragging to useLayoutEffect in Slider component to account for positioning in a popover
  • Adds a story "In Popover" to show different sliders in a popover.
  • Adds max value to active range and handle style to account for max values > 100

Screenshots & Recordings

Screen.Recording.2023-02-13.at.1.21.40.PM.mov

How it does that

  • Includes max value in calculating position of handle and ActiveRange bar (in case user uses a max value > 100)
  • Adds dragging to dependency array of useLayoutEffect to watch for position of trackRef

Testing

See storybook: Confirm that dragging handle works as expected.

@juliewongbandue juliewongbandue requested review from a team as code owners February 13, 2023 18:23
@juliewongbandue juliewongbandue merged commit 7d4029f into main Feb 13, 2023
@juliewongbandue juliewongbandue deleted the fix-slider branch February 13, 2023 19:01
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants