New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-progressive-input

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-progressive-input

Use this to create autocomplete text input which the text box can have both clear button and an activity indicator to show the background job

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

Progressive Input

Screenshot

Progressive Input is used as a part of autocomplete solution. The control has clear button to clear text and activity indicator to show that background job is being performed.

Getting started

$ npm install react-native-progressive-input --save

If you dont own the dependency react-native-vector-icons, please make sure you also run:

  • npm install react-native-vector-icons --save

  • react-native link

on the terminal. This will add some necessary fonts and Info.plist updates on your xcode project.

Usage

import ProgressiveInput from 'react-native-progressive-input';

class Screen extends Component {
  constructor(props) {
    super(props);

    this.state = {
      value: '',
      isLoading: false
    };
  }
  
  _onChangeText(text) {
    this.setState({isLoading: true, value: text});
    
    fetch("YOUR_URL_FOR_GETTING_SUGGESTION")
      .then((result) => {
        // Process list of suggestions
        
        this.setState({isLoading: false});
      });
  }

  render() {
    <ProgressiveInput
      value={this.state.value}
      isLoading={this.state.isLoading}
      onChangeText={this._onChangeText.bind(this)}
    />
  }
}

export default Screen;

Properties

NameType
autoCorrectPropTypes.bool
keyboardTypeTextInput.propTypes.keyboardType
multilinePropTypes.bool
placeholderTextColorPropTypes.string
returnKeyTypeTextInput.propTypes.returnKeyType
selectTextOnFocusPropTypes.bool
placeholderPropTypes.string
editablePropTypes.bool
autoCapitalizePropTypes.bool
maxLengthPropTypes.number
multilinePropTypes.bool
onEndEditingPropTypes.func
onChangePropTypes.func
valuePropTypes.string
isLoadingPropTypes.bool
textInputStyleTextInput.propTypes.style
clearButtonIconPropTypes.string
clearButtonColorPropTypes.string
clearButtonSizePropTypes.number
clearButtonStylePropTypes.object
activityIndicatorStyleActivityIndicator.propTypes.style
onBlurPropTypes.func
onChangeTextPropTypes.func
onFocusPropTypes.func
onInputClearedPropTypes.func

Author

License

MIT

Keywords

react-native

FAQs

Package last updated on 22 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts