Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ranges): Update thumb while animating container #80

Merged
merged 6 commits into from
May 19, 2020

Conversation

dfelber
Copy link
Contributor

@dfelber dfelber commented May 18, 2020

To update the thumb while animating I am utilizing a ResizeObserver to trigger translateThumbs. This also should make the resize observation on the window superfluous.

closes: #79;

@tajo
Copy link
Owner

tajo commented May 19, 2020

Thanks for the PR.

I think we should not add resize-observer as a dependency since it's quite a lot of code (related to this lib) and ResizeObserver is supported everywhere except IE.

Ideally, we could use ResizeObserver directly and have a fallback using the current solution when ResizeObserver is not supported. This way users can:

a. Ignore fully supporting IE and being ok with the current solution
b. Import the polyfill if they really need to support IE

package.json Outdated Show resolved Hide resolved
@dfelber
Copy link
Contributor Author

dfelber commented May 19, 2020

Thanks for the PR.

I think we should not add resize-observer as a dependency since it's quite a lot of code (related to this lib) and ResizeObserver is supported everywhere except IE.

Ideally, we could use ResizeObserver directly and have a fallback using the current solution when ResizeObserver is not supported. This way users can:

a. Ignore fully supporting IE and being ok with the current solution
b. Import the polyfill if they really need to support IE

Thanks for the feedback!
I updated the PR and removed the dependency to resize-observer.

src/Range.tsx Outdated Show resolved Hide resolved
@tajo tajo merged commit 4edcb7c into tajo:master May 19, 2020
@tajo
Copy link
Owner

tajo commented May 19, 2020

Thanks! Published as react-range@1.6.4.

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.

Thumb position does not get updated when container changes size animated
2 participants