Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes section not render #88

Closed
marcoizzo opened this issue Feb 9, 2018 · 2 comments
Closed

Sometimes section not render #88

marcoizzo opened this issue Feb 9, 2018 · 2 comments

Comments

@marcoizzo
Copy link

Hi,
thanks for this component.
I have a problem with section: sometimes the section is rendered.

I'm using:

  • "native-base": "^2.3.3"
  • "react-native": "0.52.0"
  • "react-native-largelist": "^1.2.6"

My code:

          <Container>
               <Header hasSubtitle>
                  <Left>
                     {this._renderLeftHeaderButton()}
                  </Left>
                  <Body style={{ flex: 3 }}>
                     <Title>Ricordi</Title>
                     {this._renderSubtitle()}
                  </Body>
                  <Right>
                     {this._renderRightHeaderButton()}
                  </Right>
               </Header>
              <LargeList
                  style={{ flex: 1 }}
                  //safeMargin={600}
                  numberOfRowsInSection={section => this.state.momentList[section].data.length}
                  numberOfSections={()=> this.state.momentList.length}
                  heightForCell={(section, row) =>{ return 50 }}

                  renderCell={(section) => {

                     return (
                        <View
                           style={{
                              flex: 1,
                              backgroundColor: "blue",
                              justifyContent: "center",
                              alignItems: "center"
                           }}
                        >
                           <Text>
                              CELL
                           </Text>
                        </View>
                     );

                  }}

                  heightForSection={section => { return 100 }}
                  renderSection={section => {

                     return (
                        <View
                           style={{
                              flex: 1,
                              backgroundColor: "yellow",
                              justifyContent: "center",
                              alignItems: "center"
                           }}
                        >
                           <Text>
                              I am section {section}
                           </Text>
                        </View>
                     );
                  }}
               />
          </Container>

The problem:
ezgif com-video-to-gif

How can I fix? Thanks

@bolan9999
Copy link
Owner

set numberOfSectionPoolSize larger. see this #66

Recommended value is 15-20 for your scene

@bolan9999
Copy link
Owner

closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants