From bfa733601a8c23fb3d1ddefb333129e15c8ce506 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 31 Oct 2015 12:28:17 +0100 Subject: [PATCH] [Snackbar] Assert that displayed data changed before hide/show --- src/snackbar.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/snackbar.jsx b/src/snackbar.jsx index 2d1d81ab25640c..f4507d46b295de 100644 --- a/src/snackbar.jsx +++ b/src/snackbar.jsx @@ -90,7 +90,7 @@ const Snackbar = React.createClass({ let newMuiTheme = nextContext.muiTheme ? nextContext.muiTheme : this.state.muiTheme; this.setState({muiTheme: newMuiTheme}); - if (this.state.open) { + if (this.state.open && (nextProps.message !== this.props.message || nextProps.action !== this.props.action)) { this.setState({ open: false, });