componentDidUpdate(previousProperties, previousState) {
    const shouldPositionOptions = has(this.props, 'shouldPositionOptions') ? this.props.shouldPositionOptions : config.shouldPositionOptions;

    if (shouldPositionOptions && !this.props.disabled) {
      const menuNode = ReactDOM.findDOMNode(this.refs.menu);

      // the menu was just opened
      if (!previousState.isOpen && this.state.isOpen && this.children && this.children.length > 0) {
        const positionOptions = has(this.props, 'positionOptions') ? this.props.positionOptions : config.positionOptions;
        positionOptions(this);

      // restore the old scrollTop position
      } else {
        menuNode.scrollTop = this.cachedMenuScrollTop;
      }

      const separators = filter(this.children, isSeparator);
      const childrenPresent = !isEmpty(this.options) || !isEmpty(separators);
      if (!previousState.isOpen && this.state.isOpen && childrenPresent) {
        const menuStyle = {
          ...style.menuStyle,
          ...this.props.menuStyle,
        };
        menuNode.style.display = menuStyle.display;
      }
    }
  }
In case shouldPositionOptions is active when opening the menu it is
repositioned & switched to be visible.