Giter Site home page Giter Site logo

react-native-grid-view's People

Contributors

alexrabarts avatar aliroberts avatar clmntcrl avatar lucholaf avatar maluramichael avatar mckean avatar mwilc0x avatar peterlandry avatar thewatts 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-grid-view's Issues

Stretching

It is currently not creating a real grid. If my grid is 2 items per row and i have 5 items, the 5th item is rendered across the entire row rather than in it's own part of the grid. This makes for an annoying effect:

image

onEndReached for infinite scroll?

Hi,

Thanks for this module - it's excellent. Does it support the onEndReached parameter of ListView, therefore allowing infinite scrolling?

Thanks,

Infinite scroll

Would be great to have an example with fully working infinite scroll.

Gridview not updating

Hello,

I'm currently facing a strange issue with the gridview, which is if I'm updating my array of items which are supposed to get in the grid (basically an array of objects which are then rendered accordingly), the gridview is only updating the rows if an item appears on a new line. If the item would appear on the last line as e.g. second item, the entire gridview is not updated but I need to reopen the scene to have the latest state.

Do you know what the reason for this might be?

Regards
Philipp

Navigating from each item in the GridView

Hi,

I am trying to use GridView to list some movies in my project. Each movie item in the GridView is supposed to take the application to a movie detail page. I was trying to accomplish this using the Navigator component. Please find the code snippet here:

  renderScene = (route, navigator) => {
    switch (route.name) {
      case 'List':
        return (<GridView
          items={data.result}
          itemsPerRow={MOVIES_PER_ROW}
          renderItem={this.renderItem}
          style={styles.listView}
        />);
renderItem = (item) => {
   return <Movie movie={item} onPress={this.bookClicked} />
 }

I would like to pass a 'navigator' object to my Movie component from the switch statement. I am facing trouble in doing that. Any suggestions would be appreciated.

Different Device show different affect

hi
thanks for your code.

I display 3 image per row , and i set width , on iPhone5 ,it fill the screen , but on iPhone6p it can't fill the screen .

how should i set width by percent ?

Should add Inset Adjustment on the List

The List will have a margin on the top of it unless you add

automaticallyAdjustContentInsets={false}

Would like to see this as an option that can be fed into the list view.

undefined is not a function (evaluating React.createClass)

I am getting this error

undefined is not a function (evaluating React.createClass)
while importing react-native-grid-view. It was working fine till I update react-native and node I guess.

Currently I have following versions installed.
react-native-cli: 1.0.0
react-native: 0.26.3
node: v4.4.3

Gap at the last two items

Hi,

I am using your module.

I have 5 items and its is displaying as follows
screen shot 2017-08-04 at 6 42 50 pm

How can I reduce the gap at the last two items?

Scrollbar

Can Scrollbar be visible always? Not just when I move the list down or up?

Thanks!

Getting issue with TouchableOpacity

I am trying to use "TouchableOpacity" in my Grid View and wrote my code like bellow

showPlayer(item) {
        Alert.alert("Sample", "showPlayer");
}

renderItem(item) {
      	return <TouchableOpacity style={{alignItems:"center"}} onPress={this.showPlayer.bind(this, item)}>
      		<ImageLoad
      			placeholderSource = {require('../images/PlaceHolder.png')}
			    style={styles.thumbnail}
			    isShowActivity = {false}
			    source={{uri: thumbnailObj.value}}
		/>
   		<Text style={styles.gridText}> {item.name}</Text>
   	</TouchableOpacity>
  }

For the above code I am getting error as "undefined is not an object (evaluating 'this.showPlayer.bind')"

Vertical 2 Column is scrolling horizontally.

I have a 2 columns and i have it laid out I thought perfect but the grid view not only scrolls vertically but bounces slightly horizontally. Is this a standard effect. I don't think my content size is too large as it is constrained but i am new to flexbox. If this is the standard effect is it possible to remove this with a property. Thanks.

Cell Recycling

Hi,

I saw in your README.md that you mention cell recycling: "uses a 'ListView' in order to have a proper recycle mechanism".

React Native's ListView is simply a wrapper around a UIScrollView and doesn't recycle cells - but instead instantiates all cells up front.

Is your package doing something above and beyond the ListView to achieve recycling?

Headers and Footers do not render

I am not sure if this is by design but renderHeader and renderFooter do not function.

Example Code:
` renderHeader: function() {
console.log(this.props.admin)
if (this.props.admin == true){
return (




Add Post




);
} else {
return (

);
}
},

render() {
if (!this.state.loaded) {
return this.renderLoadingView();
}
return (



);
},`

Spacer between the items

Hi

Thanks a lot for this package. I am using it right now. Saved me a good few hours of code :)

I was wondering if there any configuration/prop that can specify the "spacing" between the items?

Section Headers

Is it possible to render this grid with section headers? I've tried but I'm getting mangled section headers that don't stretch with flex: 1 and don't keep their position

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.