From 217f172af246ab4105eb4fd1133ebf7f52c8abe6 Mon Sep 17 00:00:00 2001 From: Jon Espen Kvisler Date: Tue, 20 Dec 2016 09:55:56 +0100 Subject: [PATCH] use child.props instead of this.props --- src/js/lib/Scrollspy.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/lib/Scrollspy.jsx b/src/js/lib/Scrollspy.jsx index 7357974..ddf33d9 100644 --- a/src/js/lib/Scrollspy.jsx +++ b/src/js/lib/Scrollspy.jsx @@ -185,7 +185,7 @@ export class Scrollspy extends React.Component { const ChildTag = child.type; const isScrolledPast = this.props.scrolledPastClassName && this.state.isScrolledPast[idx] const childClass = classNames({ - [`${ this.props.className }`]: this.props.className, + [`${ child.props.className }`]: child.props.className, [`${ this.props.currentClassName }`]: this.state.inViewState[idx], [`${ this.props.scrolledPastClassName }`]: isScrolledPast, })