Skip to content

Conversation

@Jeremy-Knudsen
Copy link

This is a proposed fix to the following issue: RangeSlider progress fill does not update its width on window resize of plugin

The fix entails the following:

  1. added a null check for inputElement in renderProgressTrack to prevent errors if the element isn't mounted yet
  2. within the same useEffect that initially renders the progress track, included a resize listener to recalculate the progress track width on window resize

1. Added a null check for inputElement in renderProgressTrack to prevent errors if the element isn't mounted yet.
2. Added a new useEffect that listens for window `resize` events and recalculates the progress track when the window is resized.
3. Proper cleanup - the resize listener is removed when the component unmounts
Refactor resize handling in range slider component.
@Jeremy-Knudsen Jeremy-Knudsen changed the title Fix RangeSlider progress fill does not update its width on window resize of plugin Fix: RangeSlider progress fill does not update its width on window resize of plugin Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant