We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6341c5e commit e8cd4a2Copy full SHA for e8cd4a2
src/components/colorPicker/ColorPalette.js
@@ -98,8 +98,10 @@ export default class ColorPalette extends PureBaseComponent {
98
}
99
100
onOrientationChanged = () => {
101
- this.initLocalVariables();
102
- this.setState({orientation: Constants.orientation}); // only to trigger render
+ if (this.state.orientation !== Constants.orientation) {
+ this.initLocalVariables();
103
+ this.setState({orientation: Constants.orientation}); // only to trigger render
104
+ }
105
106
107
initLocalVariables() {
0 commit comments