-
Notifications
You must be signed in to change notification settings - Fork 97
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
Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null #5
Comments
Hey, can you provide the full example? |
` <Range |
You need to spread over some props over your divs. They are being passed through in renderTrack / renderThumb. Check the examples. |
I am experiencing the same error: Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null
at Range._this.getOffsets (Range.js:42)
at Range._this.onResize (Range.js:134)
at utils.js:131 happens when |
What is native prop? Can you please provide a full example? |
Actually this is a little bit awkward... I confused 2 libraries: Nonetheless _this.getOffsets = function () {
var _a = _this.props, direction = _a.direction, values = _a.values, min = _a.min, max = _a.max;
var trackElement = _this.trackRef.current;
var trackRect = trackElement.getBoundingClientRect(); <-------------------
var trackPadding = utils_1.getPaddingAndBorder(trackElement); I am not familiar at all with Just checked and it's a call to |
When I use react-range inside styled-component I get this error
Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null
at Range._this.onMove (Range.js:198)
at Range._this.onMouseMove (Range.js:160)
at utils.js:102
The text was updated successfully, but these errors were encountered: