-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
scope: buttonChanges related to the button.Changes related to the button.scope: stylesSpecific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.
Description
I have a form which disables the 'save' button when any of the fields are invalid, however the color of the save button is out of sync with its state. It correctly can't be pressed when disabled, and the zIndex is right too, however the color is wrong.
I did some digging and it looks like the problem might be that RaisedButton.componentWillReceiveProps calls getStyles(), but getStyles reads from this.props which clearly isn't up to date at this point.
Perhaps the call to this.styles = this.getStyles(); should be delayed until render() or something?
Metadata
Metadata
Assignees
Labels
scope: buttonChanges related to the button.Changes related to the button.scope: stylesSpecific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.