From 909c5645a1470eada9fa9f8ebc912d0b473559ec Mon Sep 17 00:00:00 2001 From: kyletsang <6854874+kyletsang@users.noreply.github.com> Date: Wed, 22 Jun 2022 23:05:21 -0700 Subject: [PATCH] feat(SplitButton): add `flip` prop support --- src/SplitButton.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/SplitButton.tsx b/src/SplitButton.tsx index 2e7a6bbe68..72fa169fc3 100644 --- a/src/SplitButton.tsx +++ b/src/SplitButton.tsx @@ -19,6 +19,7 @@ export interface SplitButtonProps title: React.ReactNode; toggleLabel?: string; type?: ButtonType; + flip?: boolean; } const propTypes = { @@ -74,6 +75,13 @@ const propTypes = { */ rootCloseEvent: PropTypes.string, + /** + * Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to + * Popper.js's flip [docs](https://popper.js.org/docs/v2/modifiers/flip/). + * + */ + flip: PropTypes.bool, + /** @ignore */ bsPrefix: PropTypes.string, /** @ignore */ @@ -114,6 +122,7 @@ const SplitButton = React.forwardRef( menuRole, renderMenuOnMount, rootCloseEvent, + flip, ...props }, ref, @@ -146,6 +155,7 @@ const SplitButton = React.forwardRef( role={menuRole} renderOnMount={renderMenuOnMount} rootCloseEvent={rootCloseEvent} + flip={flip} > {children}