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

Default loading indicator is not showing #17

Open
doolb14 opened this issue May 25, 2021 · 7 comments
Open

Default loading indicator is not showing #17

doolb14 opened this issue May 25, 2021 · 7 comments

Comments

@doolb14
Copy link

doolb14 commented May 25, 2021

this is my element

import {FlatList as BidirectionList} from 'react-native-bidirectional-infinite-scroll';
<BidirectionList
        ref={listRef}
        data={data}
        keyExtractor={keyExtractor}
        renderItem={renderItem}
        onStartReached={onStartReached}
        onEndReached={onEndReached}
        showDefaultLoadingIndicators={true}
        onStartReachedThreshold={10}
        onEndReachedThreshold={10}
        activityIndicatorColor={'black'}
      />

@vishalnarkhede
Copy link
Collaborator

Hey @doolb14 could you please share some screenrecording?

@doolb14
Copy link
Author

doolb14 commented Jun 5, 2021

Screenrecorder-2021-06-05-17-22-37-713_2.mp4

@IamDhana
Copy link

IamDhana commented Jun 8, 2021

I'm also facing the same issue

       const loadMoreOlderMessages = async () => {
            if ((nextPage > 0 && !messagesLoader)) {
               // Calling the API here
            }
         };

        <FlatList
            inverted
            contentContainerStyle={{flexGrow: 1, marginBottom: wp(20)}}
            showsVerticalScrollIndicator={false}
            keyExtractor={(item) => item.toString()}
            data={messageList}
            renderItem={({item}) => (
              <MessageBubble
                item={item}
              />
            )}
            onEndReached={loadMoreOlderMessages}
            onEndReachedThreshold={50}
            showDefaultLoadingIndicators={true}
         />

@vishalnarkhede
Copy link
Collaborator

@doolb14 can you share your code for this FlatList component?

@IamDhana
Copy link

@vishalnarkhede May I know what's the issue in my code?

@vishalnarkhede
Copy link
Collaborator

@IamDhana its a bit hard to say. Inside loadMoreOlderMessages, are you ensuring await for api response?

@le-blip
Copy link

le-blip commented Apr 17, 2023

@IamDhana its a bit hard to say. Inside loadMoreOlderMessages, are you ensuring await for api response?

Hi @vishalnarkhede why is this necessary? Can you please elaborate the docs, I am willing to help you if you need me.

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

4 participants