RocketChat/react-native-keyboard-tracking-view

Name: react-native-keyboard-tracking-view

Owner: Rocket.Chat

Description: null

Forked from: wix/react-native-keyboard-tracking-view

Created: 2018-02-06 13:30:49.0

Updated: 2018-04-26 11:56:42.0

Pushed: 2018-04-26 11:56:41.0

Homepage: null

Size: 23669

Language: Objective-C

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

react-native-keyboard-tracking-view

A react native UI component that enables ?keyboard tracking” for this view and it's sub-views. Would typically be used when you have a TextInput inside this view.

Demo

Installation

How To Use

Require the native component:

rt {KeyboardTrackingView} from 'react-native-keyboard-tracking-view';

Now use it in your jsx as the parent of the views you whish to track the keyboard (usually wraps a TextInput at the bottom of the screen):

boardTrackingView style={styles.textInputContainer}>
<TextInput style={styles.textInput} />
yboardTrackingView>
Native Properties

Attribute | Description ——– | ———– trackInteractive | boolean property that enables tracking of the keyboard when it's dismissed interactively. False by default. Why? When using an external keyboard (BT), you still get the keyboard events and the view just hovers when you focus the input. Also, if you're not using interactive style of dismissing the KB (or if you don't have an input inside this view) it doesn't make sense to track it anyway. (This is caused because of the usage of inputAccessory to be able to track the keyboard interactive change and it introduces this bug)

Example Project

Check out the full example project here.

In the example folder, perform npm install and then run it from the Xcode project.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.