Giter Site home page Giter Site logo

lodev09 / react-native-cell-components Goto Github PK

View Code? Open in Web Editor NEW
177.0 6.0 16.0 8.61 MB

Awesome react-native cell components! From a Cell to more complex & awesome components.

Home Page: https://www.npmjs.com/package/react-native-cell-components

License: MIT License

JavaScript 89.95% Python 2.70% Java 1.95% Objective-C 5.40%
cell components react-native ios listview tableview

react-native-cell-components's Introduction

RN Cell Components

npm version npm

RN 0.60+ and up?

Support for RN 0.60 is limited as the moment due to compatibility issues specially the deprecated ListView. Support for FlatList will come soon and this package might drop support for realm to accomodiate that.

Installation

npm install react-native-cell-components --save

Awesome react-native cell components! As the package name says, components that are built around a Cell component. Used for a simple ActionSheet to a more complex CellTags + SelectList, and much more!

Tested with redux and on RN >=0.40

This is currently on heavy development so expect rapid changes.

demo

Features/To-do

  • Components are re-used
  • Supports redux
  • Realm support for ListView
  • Full Android support
  • Custom user theme/styles

Components

  • Cell
  • ActionSheet
  • CellGroup
  • CellInput
  • CellListProvider
  • CellSheet
  • DatePicker
  • SelectList
  • CellTags
  • CellSlider
  • CellSwitch

Dependencies

Usage & Props

coming soon, see example for now :)

Credits

Feedback and PRs are welcome!

License

See LICENSE file.

@lodev09 / www.lodev09.com

react-native-cell-components's People

Contributors

dswbx avatar hackable avatar lodev09 avatar ph1p avatar sallar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

react-native-cell-components's Issues

CellGroup: Header only accepts String

Per the CellGroup code, this.props.header can be an OBJECT or a String value. However, when you pass in an object or custom View (essentially), an error shows; "this.props.header.toUpperCase is not a function.

I'm assuming the the switch should be doing a typeof on the header so it will fall into the first case rather than the default, which cause this error.

switch(typeof this.props.header)
case "object":
return this.props.header
break;
default:
return (.......)

CellInput - Unable to set initial value

While CellInput does use TextInput within it, I am unable to set an initial value.

I'm assuming it is done like so;

In addition, I have some DatePickers on the same page. When I set the CellInput's onChangeText={(v) => {this.setState({someValue: v}) I get the following error; nextProps.date.getTime is not a function.
I'm not sure how the CellInput change is triggering the DatePicker.

Cannot add a child that doesn't have a YogaNode to a parent without a measure function!

Cannot add a child that doesn't have a YogaNode to a parent without a measure function! (Trying to add a 'ReactRawTextShadowNode' to a 'LayoutShadowNode')
//貌似是注释问题
CellGroup,如果header===“”的时候,会报错
renderHeader() {
switch (typeof this.props.header) {
case 'object':
return this.props.header;
break;
default:
return (

{
this.props.header &&
{this.props.header.toUpperCase()}
}

);
}
}

ref:facebook/react-native#18880
Here is another fun one that happens only in android (even in RN 0.55.3):

{this.props.loadingURL&& {this.props.loadingURL} }

This blows up Android with that error if loadingURL is an empty string. It works fine if it's a non-empty string or a boolean or if I change it to this (basically convert it to a boolean):

{!_.isEmpty(this.props.loadingURL)&&

Identifier 'isIphoneX' has already been declared

Getting 'Identifier 'isIphoneX' has already been declared' in theme.js file while react-native run-ios.

Environment:
"react": "16.8.3",
"react-native": "0.59.8",
"react-native-cell-components": "^0.4.4",
react-native-cli: 2.0.1
Thanks

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.