Skip to content

Commit

Permalink
Duration cannot be less then 10ms (#21858)
Browse files Browse the repository at this point in the history
Summary:
Related to: #21853

Fixes #21853
Pull Request resolved: #21858

Differential Revision: D13322060

Pulled By: hramos

fbshipit-source-id: 00a8de018fce6507aa131a11ba3e95d57044e683
  • Loading branch information
Baldy Lukasz authored and facebook-github-bot committed Dec 4, 2018
1 parent f77aa4e commit 87b6533
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Libraries/Components/Keyboard/KeyboardAvoidingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ class KeyboardAvoidingView extends React.Component<Props, State> {

if (duration && easing) {
LayoutAnimation.configureNext({
duration: duration,
// We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m
duration: duration > 10 ? duration : 10,
update: {
duration: duration,
duration: duration > 10 ? duration : 10,
type: LayoutAnimation.Types[easing] || 'keyboard',
},
});
Expand Down

0 comments on commit 87b6533

Please sign in to comment.