Skip to content

Commit

Permalink
on Android, do not intercept swipe in BaseOptionSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
akinwale committed Sep 29, 2023
1 parent c0f062b commit 37555f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/OptionsSelector/BaseOptionsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ class BaseOptionsSelector extends Component {
selectTextOnFocus
blurOnSubmit={Boolean(this.state.allOptions.length)}
spellCheck={false}
shouldInterceptSwipe
shouldInterceptSwipe={this.props.shouldTextInputInterceptSwipe}
/>
);
const optionsList = (
Expand Down
1 change: 1 addition & 0 deletions src/components/OptionsSelector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const OptionsSelector = forwardRef((props, ref) => (
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
ref={ref}
shouldTextInputInterceptSwipe
/>
));

Expand Down
4 changes: 4 additions & 0 deletions src/components/OptionsSelector/optionsSelectorPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ const propTypes = {

/** Initial focused index value */
initialFocusedIndex: PropTypes.number,

/** Whether the text input should intercept swipes or not */
shouldTextInputInterceptSwipe: PropTypes.bool,
};

const defaultProps = {
Expand Down Expand Up @@ -160,6 +163,7 @@ const defaultProps = {
shouldUseStyleForChildren: true,
isRowMultilineSupported: false,
initialFocusedIndex: undefined,
shouldTextInputInterceptSwipe: false,
};

export {propTypes, defaultProps};

0 comments on commit 37555f7

Please sign in to comment.