dismissKeyboard.js 519 B

123456789101112131415161718192021
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @flow strict-local
  8. * @format
  9. */
  10. // This function dismisses the currently-open keyboard, if any.
  11. 'use strict';
  12. const TextInputState = require('../Components/TextInput/TextInputState');
  13. function dismissKeyboard() {
  14. TextInputState.blurTextInput(TextInputState.currentlyFocusedInput());
  15. }
  16. module.exports = dismissKeyboard;