diff --git a/src/components/OptionsSelector/BaseOptionsSelector.js b/src/components/OptionsSelector/BaseOptionsSelector.js index df15ad71febc..71b2d112cb90 100755 --- a/src/components/OptionsSelector/BaseOptionsSelector.js +++ b/src/components/OptionsSelector/BaseOptionsSelector.js @@ -24,6 +24,12 @@ const propTypes = { /** padding bottom style of safe area */ safeAreaPaddingBottomStyle: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]), + /** Content container styles for OptionsList */ + contentContainerStyles: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]), + + /** List container styles for OptionsList */ + listContainerStyles: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]), + ...optionsSelectorPropTypes, ...withLocalizePropTypes, ...withNavigationFocusPropTypes, @@ -32,6 +38,8 @@ const propTypes = { const defaultProps = { shouldDelayFocus: false, safeAreaPaddingBottomStyle: {}, + contentContainerStyles: [], + listContainerStyles: [styles.flex1], ...optionsSelectorDefaultProps, }; @@ -282,6 +290,7 @@ class BaseOptionsSelector extends Component { !this.props.isReadOnly && (this.props.shouldShowConfirmButton || this.props.footerContent) && !(this.props.canSelectMultipleOptions && _.isEmpty(this.props.selectedOptions)); const defaultConfirmButtonText = _.isUndefined(this.props.confirmButtonText) ? this.props.translate('common.confirm') : this.props.confirmButtonText; const shouldShowDefaultConfirmButton = !this.props.footerContent && defaultConfirmButtonText; + const safeAreaPaddingBottomStyle = shouldShowFooter ? undefined : this.props.safeAreaPaddingBottomStyle; const textInput = ( (this.textInput = el)} @@ -325,7 +334,8 @@ class BaseOptionsSelector extends Component { this.props.onLayout(); } }} - contentContainerStyles={shouldShowFooter ? undefined : [this.props.safeAreaPaddingBottomStyle]} + contentContainerStyles={[safeAreaPaddingBottomStyle, ...this.props.contentContainerStyles]} + listContainerStyles={this.props.listContainerStyles} isLoading={!this.props.shouldShowOptions} /> ); @@ -336,7 +346,7 @@ class BaseOptionsSelector extends Component { maxIndex={this.state.allOptions.length - 1} onFocusedIndexChanged={this.props.disableArrowKeysActions ? () => {} : this.updateFocusedIndex} > - + {this.props.shouldTextInputAppearBelowOptions ? ( <> {optionsList} diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js index 60eb0a4c4dcc..c7ff53903855 100644 --- a/src/pages/workspace/WorkspaceInvitePage.js +++ b/src/pages/workspace/WorkspaceInvitePage.js @@ -272,8 +272,10 @@ class WorkspaceInvitePage extends React.Component { Navigation.goBack(ROUTES.getWorkspaceMembersRoute(this.props.route.params.policyID)); }} /> - +