diff --git a/src/components/Popover/index.js b/src/components/Popover/index.js index 2f97aa9f55f5..6b6f97b29bcb 100644 --- a/src/components/Popover/index.js +++ b/src/components/Popover/index.js @@ -19,6 +19,8 @@ const Popover = (props) => { {...props} animationIn={props.isSmallScreenWidth ? undefined : props.animationIn} animationOut={props.isSmallScreenWidth ? undefined : props.animationOut} + animationInTiming={props.disableAnimation ? 1 : props.animationInTiming} + animationOutTiming={props.disableAnimation ? 1 : props.animationOutTiming} shouldCloseOnOutsideClick />, document.body, @@ -33,6 +35,8 @@ const Popover = (props) => { fullscreen={props.isSmallScreenWidth ? true : props.fullscreen} animationIn={props.isSmallScreenWidth ? undefined : props.animationIn} animationOut={props.isSmallScreenWidth ? undefined : props.animationOut} + animationInTiming={props.disableAnimation && !props.isSmallScreenWidth ? 1 : props.animationInTiming} + animationOutTiming={props.disableAnimation && !props.isSmallScreenWidth ? 1 : props.animationOutTiming} /> ); }; diff --git a/src/components/Popover/index.native.js b/src/components/Popover/index.native.js index 8d912ff6c26a..1c8883220d14 100644 --- a/src/components/Popover/index.native.js +++ b/src/components/Popover/index.native.js @@ -14,7 +14,7 @@ const propTypes = { * On small screen widths, it uses BottomDocked modal type, and a Popover type on wide screen widths. */ const Popover = (props) => { - const propsWithoutAnimation = _.omit(props, ['animationIn', 'animationOut', 'popoverAnchorPosition']); + const propsWithoutAnimation = _.omit(props, ['animationIn', 'animationOut', 'popoverAnchorPosition', 'disableAnimation']); return ( {!_.isEmpty(this.props.headerText) && ( diff --git a/src/components/PopoverMenu/popoverMenuPropTypes.js b/src/components/PopoverMenu/popoverMenuPropTypes.js index fa452bf09f1f..402b63418d1b 100644 --- a/src/components/PopoverMenu/popoverMenuPropTypes.js +++ b/src/components/PopoverMenu/popoverMenuPropTypes.js @@ -46,12 +46,16 @@ const propTypes = { /** Optional non-interactive text to display as a header for any create menu */ headerText: PropTypes.string, + + /** Whether disable the animations */ + disableAnimation: PropTypes.bool, }; const defaultProps = { animationIn: 'fadeIn', animationOut: 'fadeOut', headerText: undefined, + disableAnimation: true, }; export {propTypes, defaultProps}; diff --git a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js index ffb11ae79f3a..77239361d603 100644 --- a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js +++ b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js @@ -258,6 +258,7 @@ class PopoverReportActionContextMenu extends React.Component { onModalHide={this.runAndResetOnPopoverHide} anchorPosition={this.state.popoverAnchorPosition} animationIn="fadeIn" + disableAnimation={false} animationOutTiming={1} measureContent={this.measureContent} shouldSetModalVisibility={false} diff --git a/src/pages/home/sidebar/SidebarScreen.js b/src/pages/home/sidebar/SidebarScreen.js index d89624980029..4a5ad6c85c6d 100755 --- a/src/pages/home/sidebar/SidebarScreen.js +++ b/src/pages/home/sidebar/SidebarScreen.js @@ -150,8 +150,6 @@ class SidebarScreen extends Component { onClose={this.toggleCreateMenu} isVisible={this.state.isCreateMenuActive} anchorPosition={styles.createMenuPositionSidebar} - animationIn="fadeInLeft" - animationOut="fadeOutLeft" onItemSelected={this.onCreateMenuItemSelected} menuItems={[ {