Commit 1622e20 1 parent 33d5b52 commit 1622e20 Copy full SHA for 1622e20
File tree 1 file changed +7
-4
lines changed
Libraries/Components/Keyboard
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 5
5
* LICENSE file in the root directory of this source tree.
6
6
*
7
7
* @format
8
- * @flow
8
+ * @flow strict-local
9
9
*/
10
10
11
11
'use strict' ;
@@ -121,7 +121,10 @@ let Keyboard = {
121
121
* @param {string } eventName The `nativeEvent` is the string that identifies the event you're listening for.
122
122
* @param {function } callback function to be called when the event fires.
123
123
*/
124
- removeListener ( eventName : KeyboardEventName , callback : Function ) {
124
+ removeListener (
125
+ eventName : KeyboardEventName ,
126
+ callback : KeyboardEventListener ,
127
+ ) {
125
128
invariant ( false , 'Dummy method used for documentation' ) ;
126
129
} ,
127
130
@@ -155,12 +158,12 @@ Keyboard = KeyboardEventEmitter;
155
158
Keyboard . dismiss = dismissKeyboard ;
156
159
Keyboard . scheduleLayoutAnimation = function ( event : KeyboardEvent ) {
157
160
const { duration, easing} = event ;
158
- if ( duration ) {
161
+ if ( duration != null && duration !== 0 ) {
159
162
LayoutAnimation . configureNext ( {
160
163
duration : duration ,
161
164
update : {
162
165
duration : duration ,
163
- type : ( easing && LayoutAnimation . Types [ easing ] ) || 'keyboard' ,
166
+ type : ( easing != null && LayoutAnimation . Types [ easing ] ) || 'keyboard' ,
164
167
} ,
165
168
} ) ;
166
169
}
You can’t perform that action at this time.
0 commit comments