Giter Site home page Giter Site logo

react-native-alphabetflatlist's People

Contributors

ayushnawani avatar fenntasy 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

Watchers

 avatar  avatar  avatar  avatar  avatar

react-native-alphabetflatlist's Issues

Local JSON

Do you have any ideas how to make this work with importing local json file?

Sample format :

[
   {
      "name":"Afghanistan",
      "flag":"πŸ‡¦πŸ‡«",
      "code":"AF",
      "dial_code":"+93"
   },
   {
      "name":"Γ…land Islands",
      "flag":"πŸ‡¦πŸ‡½",
      "code":"AX",
      "dial_code":"+358"
   }
]

Support of Object Type

Can support Object rather than single value ?
For Example
Object.label used for display on the flatlist
Object.id is the key

Warning: Failed child context type: Invalid child context `virtualizedCell.cellKey` of type `number` supplied to `CellRenderer`, expected `string`

It seems like the wrong type is being used here as CellRenderer expects a string but a number is being sent instead. I've been able to track the issue down to line 161 of index.js (https://github.com/ayushnawani/react-native-alphabetflatlist/blob/master/index.js#L161)

This error applies for the right side Alphabet FlatList keyExtractor so it can't be overwritten. It looks like there are two options to fix this:

  1. Instead of using
alphabetKeyExtractor = (item, index) => index

we could use

alphabetKeyExtractor = (item, index) => index.toString()
  1. Allow people to overwrite the the Alphabet Flatlist keyExtractor.

I think it makes more sense to apply fix # 1 since the right side Alphabet FlatList is controlled, mainly, by the library.

What are your thoughts on this?

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.