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 #179 : value not being updated on change #182

Closed
wants to merge 2 commits into from

Conversation

Sharcoux
Copy link
Contributor

@Sharcoux Sharcoux commented May 19, 2020

Summary:

Fix issue #179

Test Plan:

@Sharcoux Sharcoux changed the title Fix value not being updated on change Fix #179 : value not being updated on change May 19, 2020
Copy link
Contributor

@EvanBacon EvanBacon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks for the contribution!

@@ -167,6 +167,7 @@ const RCTSliderWebComponent = React.forwardRef(
const containerSize = React.useRef({width: 0, height: 0});
const containerRef = forwardedRef || React.createRef();
const [value, setValue] = React.useState(initialValue || minimumValue);
React.useLayoutEffect(() => updateValue(initialValue), [initialValue])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the lint error then we can merge.

@michalchudziak
Copy link
Collaborator

@Sharcoux Thank you for those PRs we'd like to merge them in - could you take a look at lint issues?

@brentvatne brentvatne mentioned this pull request May 25, 2020
brentvatne added a commit that referenced this pull request May 25, 2020
* Fix value not being updated on change

* Update src/js/RNCSliderNativeComponent.web.js

* Fix lint warnings

Co-authored-by: François Billioud <darksharcoux@hotmail.com>
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.

None yet

4 participants