MELS component should update if there are fewEvents, effectively expanding the summary

This commit is contained in:
Luke Barnard 2016-12-15 18:33:13 +00:00
parent 6b52b247e7
commit 7475056bb4

View file

@ -149,9 +149,11 @@ module.exports = React.createClass({
// - The number of summarised events has changed // - The number of summarised events has changed
// - or if the summary is currently expanded // - or if the summary is currently expanded
// - or if the summary is about to toggle to become collapsed // - or if the summary is about to toggle to become collapsed
// - or if there are fewEvents, meaning the child eventTiles are shown as-is
return ( return (
nextProps.events.length !== this.props.events.length || nextProps.events.length !== this.props.events.length ||
this.state.expanded || nextState.expanded this.state.expanded || nextState.expanded ||
nextProps.events.length < this.props.threshold
); );
}, },