Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

How to use it on a table in ruby on rails #250

Open
Xindi-Li opened this issue Nov 19, 2017 · 0 comments
Open

How to use it on a table in ruby on rails #250

Xindi-Li opened this issue Nov 19, 2017 · 0 comments

Comments

@Xindi-Li
Copy link

I'm adding infinite scrolling to a table in an old project based on ruby on rails. I installed it using bower and imported it through //= require react-infinite in application.js because other js libraries were imported this way. var Infinite = require('react-infinite'); would raise an error "ReferenceError: require is not defined". Then I used it like this:

            <react-infinite containerHeight={200} elementHeight={40}>
          <ContentTable
            data={this.state.tableData}
            filterText={this.state.filterText}
            onUserClick={this.handleUserClick}
            dataType={this.props.dataType}
            showPublic={this.state.publicCheckbox}
          />
            </react-infinite>

But in the console, there is an error "Error: Cannot find module 'prop-types". How could I make it work?

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

No branches or pull requests

1 participant