GithubHelp home page GithubHelp logo

isabella232 / react-native-keyboard-tracking-view Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mattermost/react-native-keyboard-tracking-view

0.0 0.0 0.0 23.34 MB

License: MIT License

Python 3.50% Java 2.85% JavaScript 13.69% Objective-C 78.82% Ruby 1.14%

react-native-keyboard-tracking-view's Introduction

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

  • Install using npm:

     npm i react-native-keyboard-tracking-view --save
    
  • Locate the module lib folder in your node modules: PROJECT_DIR/node_modules/react-native-keyboard-tracking-view/lib.

  • Drag the KeyboardTrackingView.xcodeproj project file into your project

  • Add libKeyboardTrackingView.a to your target's Linked Frameworks and Libraries.

How To Use

Require the native component:

import {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):

<KeyboardTrackingView style={styles.textInputContainer}>
	<TextInput style={styles.textInput} />
</KeyboardTrackingView>

##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.

react-native-keyboard-tracking-view's People

Contributors

artald avatar enahum avatar gran33 avatar jarred-sumner avatar leonatan avatar migbot avatar noamco avatar rotemmiz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.