Skip to content

Commit e55c76a

Browse files
committed
Added useNativeDriver prop
1 parent 5de46ca commit e55c76a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/components/dropdown/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ export default class Dropdown extends PureComponent {
7777
'landscape-left',
7878
'landscape-right',
7979
],
80+
81+
useNativeDriver: false,
8082
};
8183

8284
static propTypes = {
@@ -150,6 +152,8 @@ export default class Dropdown extends PureComponent {
150152
pickerStyle: (ViewPropTypes || View.propTypes).style,
151153

152154
supportedOrientations: PropTypes.arrayOf(PropTypes.string),
155+
156+
useNativeDriver: PropTypes.bool,
153157
};
154158

155159
constructor(props) {
@@ -210,6 +214,7 @@ export default class Dropdown extends PureComponent {
210214
dropdownMargins: { min: minMargin, max: maxMargin },
211215
animationDuration,
212216
absoluteRTLLayout,
217+
useNativeDriver,
213218
} = this.props;
214219

215220
if (disabled) {
@@ -295,7 +300,7 @@ export default class Dropdown extends PureComponent {
295300
.timing(opacity, {
296301
duration: animationDuration,
297302
toValue: 1,
298-
useNativeDriver: true,
303+
useNativeDriver,
299304
})
300305
.start(() => {
301306
if (this.mounted && 'ios' === Platform.OS) {
@@ -312,14 +317,14 @@ export default class Dropdown extends PureComponent {
312317
}
313318

314319
onClose(value = this.state.value) {
315-
let { onBlur, animationDuration } = this.props;
320+
let { onBlur, animationDuration, useNativeDriver } = this.props;
316321
let { opacity } = this.state;
317322

318323
Animated
319324
.timing(opacity, {
320325
duration: animationDuration,
321326
toValue: 0,
322-
useNativeDriver: true,
327+
useNativeDriver,
323328
})
324329
.start(() => {
325330
this.focused = false;

0 commit comments

Comments
 (0)