diff --git a/components/BackgroundSelect.js b/components/BackgroundSelect.js index 27e5eb6..f4c798f 100644 --- a/components/BackgroundSelect.js +++ b/components/BackgroundSelect.js @@ -10,12 +10,16 @@ import { parseRGBA, capitalizeFirstLetter } from '../lib/util' class BackgroundSelect extends React.Component { constructor() { super() - this.state = { isVisible: false, selectedTab: 'color' } + this.state = { isVisible: false, selectedTab: 'color', mounted: false } this.toggle = this.toggle.bind(this) this.selectTab = this.selectTab.bind(this) this.handlePickColor = this.handlePickColor.bind(this) } + componentDidMount() { + this.setState({ mounted: true }) + } + toggle() { this.setState({ isVisible: !this.state.isVisible }) } @@ -77,10 +81,12 @@ class BackgroundSelect extends React.Component {