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

loadMore function does not fire with table #283

Open
animeshchat opened this issue Aug 25, 2021 · 3 comments
Open

loadMore function does not fire with table #283

animeshchat opened this issue Aug 25, 2021 · 3 comments

Comments

@animeshchat
Copy link

Hi there,

First of all - great component. I've used it for many projects. Thanks for maintaining it!

I recently tried using it to make the rows of a table infinite scroll, but the loadMore function does not fire. I tried something like this -

<table>
    <thead>
        <tr>
            <th></th>
            <th></th>
        </tr>
    </thead>
    <InfiniteScroll 
        initialLoad={false}
        hasMore={true}
        loadMore={loadMore}
        element={'tbody'}
        useWindow={true}>
        {people..map(person => (
                <tr key={person.id}>
                    <td>{person.age}</td>
                    <td>{person.age}</td>
                </tr>
            ))}
    </InfiniteScroll>
</table>

I've read others report that they got it to work with tables, but couldn't find a solution.

I don't want to move to another component just for the table use-case.

Could someone help out?

@satya-vinay
Copy link

@animeshchat, Were you able to find a solution to it?

@animeshchat
Copy link
Author

animeshchat commented Sep 16, 2021

Nope, I didn't.

I had shrugged this under the mat, but it's becoming hard to ignore. I might fork and attempt to fix. I'll post the link here when I do.

@wenlittleoil
Copy link

Maybe you should see this, it solved the same problem. #168 (comment)

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

3 participants