# react-native-text-input-reset

> This package provides a temporary hack around a bug found in some android keyboards so that the contents of a TextInput can be properly cleared. https://issuetracker.google.com/issues/36928977

Latest version **1.0.4** (published 2019-12-17) · 0 weekly downloads

## Install

```sh
npm install react-native-text-input-reset
pnpm add react-native-text-input-reset
yarn add react-native-text-input-reset
bun add react-native-text-input-reset
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2019-12-17 |
| First published | 2017-09-27 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 27 |
| Maintainers | nickwarner |
| Keywords | react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-text-input-reset
- Repository: https://github.com/nikolaiwarner/react-native-text-input-reset
- Homepage: https://github.com/nikolaiwarner/react-native-text-input-reset#readme
- Issues: https://github.com/nikolaiwarner/react-native-text-input-reset/issues
- npm.io page: https://npm.io/package/react-native-text-input-reset

## Recent versions

- 1.0.4 (latest) — 2019-12-17
- 1.0.3 — 2019-12-04
- 1.0.2 — 2017-11-06
- 1.0.1 — 2017-10-06
- 1.0.0 — 2017-09-27

## README

# react-native-text-input-reset

This package provides a temporary hack around a bug found in some android
keyboards so that the contents of a TextInput can be properly cleared.
https://issuetracker.google.com/issues/36928977

It's likely this will be solved in a future release of React Native.
https://github.com/facebook/react-native/pull/12462

## Getting started

`$ yarn add react-native-text-input-reset`

### Mostly automatic installation

`$ react-native link react-native-text-input-reset`

### Manual installation

#### Android

1. Open up `android/app/src/main/java/[...]/MainApplication.java`
  - Add `import com.nikolaiwarner.RNTextInputReset.RNTextInputResetPackage;` to the imports at the top of the file
  - Add `new RNTextInputResetPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
  	```
  	include ':react-native-text-input-reset'
  	project(':react-native-text-input-reset').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-text-input-reset/android')
  	```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
  	```
      compile project(':react-native-text-input-reset')
  	```

## Usage
```javascript
import TextInputReset from 'react-native-text-input-reset';

// Clear text input and keyboard suggestions
TextInputReset.resetKeyboardInput(findNodeHandle(this.textInputRef))
```

---
_Source: https://npm.io/package/react-native-text-input-reset · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
