react-scrollspy icon indicating copy to clipboard operation
react-scrollspy copied to clipboard

Handling new props

Open rdiazv opened this issue 8 years ago • 2 comments

_initFromProps () {
  const targetItems = this._initSpyTarget(this.props.items)
  ...
}

componentWillReceiveProps () {
  this._initFromProps()
}

this.props.items are still the old items when calling _initFromProps in componentWillReceiveProps, so the component don't actually update.

I had to include jsdom to handle document.getElementById in the tests.

rdiazv avatar Aug 12 '16 20:08 rdiazv

I'm having trouble with jsdom on Travis CI... any thoughts?

rdiazv avatar Aug 12 '16 20:08 rdiazv

@rdiazv From the log of travis ci, it seems to be an issue with installing contextify that is a dependency of jsdom.

2016-08-13 18 51 51

makotot avatar Aug 13 '16 10:08 makotot