Skip to content

Commit 4413ab1

Browse files
authored
Disable panning in native picker dialogs (#1071)
* disable panning in native picker dialogs * take panDirection from this.props
1 parent 1e6486f commit 4413ab1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/components/picker/PickerDialog.android.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ class PickerDialog extends BaseComponent {
8282

8383
render() {
8484
const dialogProps = extractComponentProps(Dialog, this.props);
85+
// TODO: should be taken from dialogProps but there's an issue with "babel-plugin-typescript-to-proptypes" plugin
86+
const {panDirection} = this.props;
8587
return (
86-
<Dialog {...dialogProps} migrate height="50%" width="77%">
88+
<Dialog {...dialogProps} migrate height="50%" width="77%" panDirection={panDirection}>
8789
<View style={styles.dialog}>
8890
{this.renderHeader()}
8991
<View flex center paddingH-24>

src/components/picker/PickerDialog.ios.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ class PickerDialog extends BaseComponent {
5353

5454
render() {
5555
const dialogProps = extractComponentProps(Dialog, this.props);
56+
// TODO: should be taken from dialogProps but there's an issue with "babel-plugin-typescript-to-proptypes" plugin
57+
const {panDirection} = this.props;
5658
return (
57-
<Dialog {...dialogProps} height={250} width="100%" migrate bottom animationConfig={{duration: 300}}>
59+
<Dialog {...dialogProps} height={250} width="100%" migrate bottom animationConfig={{duration: 300}} panDirection={panDirection}>
5860
<View flex bg-white>
5961
{this.renderHeader()}
6062
<View centerV flex>

0 commit comments

Comments
 (0)