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

ScrollViewComponent of type object supplied to BigList #141

Closed
AnisLarguet123 opened this issue Jan 19, 2022 · 3 comments
Closed

ScrollViewComponent of type object supplied to BigList #141

AnisLarguet123 opened this issue Jan 19, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@AnisLarguet123
Copy link

i have copied the same example as you mentioned but i got this error ?
` <BigList
headerHeight={100} // Default 0, need to specify the header height
footerHeight={100} // Default 0, need to specify the footer height

    //  renderEmpty={renderItemEmpty}
      ListEmptyComponent= {renderItemEmpty}
      placeholder
      onRefresh={() => onRefresh()}
      refreshing={state.isFetching}          
      contentContainerStyle={{
       display:"flex",
       alignItems:"center",
       justifyContent:"center"
        }}
      data={data}
      placeholderComponent={()=>(<View />)}
      ScrollViewComponent ={ScrollView}
     // renderItem={({item,index})=>renderItem({item,index}) }
      renderItem={renderItem}
      itemHeight={height+20} 
      keyExtractor={(item, index) => `keyExtractor_${index.toString()}`}
      ListFooterComponent={renderLoader}
      onEndReached={loadMore}
      onEndReachedThreshold={0.01}
      initialNumToRender={100}   
  />

`

Warning: Failed prop type: Invalid prop ScrollViewComponent of type object supplied to BigList, expected function.

@GollyJer
Copy link

GollyJer commented Jan 19, 2022

Hi. I just installed BigList and had the same problem.
It seems everything works fine even though the error is thrown. Not sure what to do.

tried adding this as a quick workaround but same error.
ScrollViewComponent={ScrollView}

@marcocesarato marcocesarato added the bug Something isn't working label Jan 19, 2022
@marcocesarato
Copy link
Owner

Hi, this feature is related to pull request #137. I tried adding more types. Tell me if it is now fixed in the next version.

marcocesarato added a commit that referenced this issue Jan 19, 2022
@AnisLarguet123
Copy link
Author

  the new version fixed the big, i just added this line, thank you

ScrollViewComponent ={ScrollView}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants