async _alignInvokerWidth() {
    await this.updateComplete;

    if (!this._overlayCtrl?.content) {
      return;
    }

    const initContentDisplay = this._overlayCtrl.content.style.display;
    const initContentMinWidth = this._overlayCtrl.contentWrapperNode.style.minWidth;
    const initContentWidth = this._overlayCtrl.contentWrapperNode.style.width;
    this._overlayCtrl.content.style.display = '';
    this._overlayCtrl.contentWrapperNode.style.minWidth = 'auto';
    this._overlayCtrl.contentWrapperNode.style.width = 'auto';
    const contentWidth = this._overlayCtrl.contentWrapperNode.getBoundingClientRect().width;
    /**
     * TODO when inside an overlay the current solution doesn't work.
     * Since that dialog is still hidden, open and close the select-rich
     * doesn't have any effect so the contentWidth returns 0
     */
    if (contentWidth > 0) {
      this._invokerNode.style.width = `${contentWidth + this._arrowWidth}px`;
    }
    this._overlayCtrl.content.style.display = initContentDisplay;
    this._overlayCtrl.contentWrapperNode.style.minWidth = initContentMinWidth;
    this._overlayCtrl.contentWrapperNode.style.width = initContentWidth;
  }
Align invoker width with content width
Make sure display is not set to "none" while calculating the content width
@protected