         UserDefaults.standard.set(shouldExpand, forKey: Constants.overflowExpandedUserDefaultsKey)
 
         formatter?.formatBar(self, didChangeOverflowState: (shouldExpand) ? .visible : .hidden)
+
+        overflowToggleItemRTLLeadingConstraint?.isActive = shouldExpand
+        updateOverflowToggleItemRTLConstraints()
     }
 
     private func setOverflowItemsVisible(_ visible: Bool, animated: Bool = true) {

        scrollView.alwaysBounceHorizontal = false
        scrollView.translatesAutoresizingMaskIntoConstraints = false
        scrollView.delegate = self

        updateScrollViewInsets()
    }

    func updateScrollViewInsets() {
        // Add padding at the end to account for overflow button
        let layoutDirection = UIView.userInterfaceLayoutDirection(for: semanticContentAttribute)
        switch layoutDirection {
        case .leftToRight:
            scrollView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: trailingInset)
        case .rightToLeft:
            scrollView.contentInset = UIEdgeInsets(top: 0, left: trailingInset, bottom: 0, right: 0)
        }
    }


    /// Sets up the Constraints
    ///

    fileprivate func updateOverflowToggleItemVisibility() {
        let hasOverflowItems = !overflowItems.isEmpty
        overflowToggleItem.isHidden = !hasOverflowItems || trailingItem != nil
    }

    /// Updates the overflowToggleItemRTLLeadingConstraint with the correct value. On LTR layout this function does nothing.
    ///
    private func updateOverflowToggleItemRTLConstraints() {
        overflowToggleItemRTLLeadingConstraint?.constant = scrollableStackView.frame.width - frame.width
    }

    @available(iOS 11.0, *)
