mirror of
https://github.com/status-im/react-native.git
synced 2025-01-12 18:44:25 +00:00
f17047e230
Summary: The `dismissKeyboard` module is widely used but did not have flow typing on it, preventing other js modules that use it from annotating themselves as flow strict-local. This diff adds a flow annotation to the `dismissKeyboard` module of the strictest type supported for this module, which is flow strict-local. Reviewed By: gkz Differential Revision: D9143671 fbshipit-source-id: af2367e6c59276402dcbcb9cf0f64b44ff42f531
23 lines
493 B
JavaScript
23 lines
493 B
JavaScript
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
*
|
|
* This function dismisses the currently-open keyboard, if any
|
|
*
|
|
* @flow strict-local
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const TextInputState = require('TextInputState');
|
|
|
|
function dismissKeyboard() {
|
|
TextInputState.blurTextInput(TextInputState.currentlyFocusedField());
|
|
}
|
|
|
|
module.exports = dismissKeyboard;
|