Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 63883a1

Browse files
authored
Merge pull request #40 from jonespen/child-classname
Use child.props instead of this.props when settings child class
2 parents 6e00ffb + 217f172 commit 63883a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/lib/Scrollspy.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export class Scrollspy extends React.Component {
185185
const ChildTag = child.type;
186186
const isScrolledPast = this.props.scrolledPastClassName && this.state.isScrolledPast[idx]
187187
const childClass = classNames({
188-
[`${ this.props.className }`]: this.props.className,
188+
[`${ child.props.className }`]: child.props.className,
189189
[`${ this.props.currentClassName }`]: this.state.inViewState[idx],
190190
[`${ this.props.scrolledPastClassName }`]: isScrolledPast,
191191
})

0 commit comments

Comments
 (0)