Update component to suit Appear Here's needs#1
Merged
rdjpalmer merged 6 commits intoappearhere:masterfrom Jan 30, 2017
Merged
Conversation
Allow overriding of Track, Slider and Label components Allow passing extra children to InputRange and Slider
Adds a `showLabel` prop for hidding the labels
Changes `onChange` and `onChangeComplete` to simply return the range's value(s) as opposed to a reference to the component, `this` and the value(s)
- Removes unnecessary `renderHiddenInputs` method, moving the logic inline to the render method - Fixes the logic to ensure the loop actually returns hidden inputs - Fixes hidden inputs so they render with values - Adds a prop for switching the hidden inputs on/off
- Scopes the package to @appearhere - Adds custom field of `parentVersion`, denoting the last merged version of `davidchin/react-input-range`
|
good work 👍 bump version and release 💯 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates
react-input-rangeto include some other user's works alongside some modifications to make the component more suitable for Appear Here's use of the componentonChangeandonChangeCompletecallbacks as per component in the onChange davidchin/react-input-range#20ownerDocumentwhich causes issues withredux-form(TypeError: Cannot read property 'ownerDocument' of undefined when using with redux-form davidchin/react-input-range#56) and seems to cause us issues too. We've no need to rely onownerDocument—none of our other components use it—and I can't envisage a scenario where we'll be doing complex work with multiple documentsrenderHiddenInputsas per Hidden inputs never worked davidchin/react-input-range#40 and improves the logic around it, including a control to switch it on and off so ournonLinearise()HoF can implement it's own version