You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, this is a great tool, but I can't seem to figure out how to make the custom render for trackX work. When I get the props like in the example: trackXRenderer={ props => { const {elementRef, ...restProps} = props; return <span {...restProps} className="MyAwesomeTrackVertical" ref={elementRef}/> } }
props only has children, className, onClick, and style, with no elementRef. As a result the scroll doesn't function.
When I look in the code under dist/Track.js, I see this: props = _objectWithoutProperties(_this$props, ["className", "renderer", "type", "elementRef", "onClick"]); props.className = "track " + (type === TYPE_X ? "trackX" : "trackY") + (className ? " " + className : ""); props.onClick = this.onClickHandler; return renderer ? renderer(props) : _react.default.createElement("div", _extends({}, props, {
It's clearly stripping out the elementRef property before calling my custom render function.
Is this by design? Am I meant to somehow implement the custom render without the elementRef property?
Thanks,
Nathan
The text was updated successfully, but these errors were encountered:
Hi, this is a great tool, but I can't seem to figure out how to make the custom render for trackX work. When I get the props like in the example:
trackXRenderer={ props => { const {elementRef, ...restProps} = props; return <span {...restProps} className="MyAwesomeTrackVertical" ref={elementRef}/> } }
props only has
children
,className
,onClick
, andstyle
, with noelementRef
. As a result the scroll doesn't function.When I look in the code under
dist/Track.js
, I see this:props = _objectWithoutProperties(_this$props, ["className", "renderer", "type", "elementRef", "onClick"]); props.className = "track " + (type === TYPE_X ? "trackX" : "trackY") + (className ? " " + className : ""); props.onClick = this.onClickHandler; return renderer ? renderer(props) : _react.default.createElement("div", _extends({}, props, {
It's clearly stripping out the
elementRef
property before calling my custom render function.Is this by design? Am I meant to somehow implement the custom render without the
elementRef
property?Thanks,
Nathan
The text was updated successfully, but these errors were encountered: