From ad0fa270616b87b7716dde84c5effa159a29c3ca Mon Sep 17 00:00:00 2001 From: Simon Mollweide Date: Fri, 31 Mar 2017 15:20:00 +0200 Subject: [PATCH] [bugfix] use correct setState method --- package.json | 2 +- src/components/speed-dial/speed-dial.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 56a2f80..bb65e22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-speed-dial", - "version": "0.4.2", + "version": "0.4.3", "description": "React Component that implements a speed dial using Material-UI.", "email": "simon.mollweide@web.de", "author": "Simon Mollweide ", diff --git a/src/components/speed-dial/speed-dial.js b/src/components/speed-dial/speed-dial.js index 53acc37..fec0825 100644 --- a/src/components/speed-dial/speed-dial.js +++ b/src/components/speed-dial/speed-dial.js @@ -95,11 +95,10 @@ class SpeedDial extends React.Component { /** * @param {Object} nextProps - the next props Object - * @param {Function} setState - the setState method * @returns {void} */ - componentWillReceiveProps(nextProps, setState = this.setState) { - setState({ + componentWillReceiveProps(nextProps) { + this.setState({ isOpen: nextProps.isOpen, }); }