Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.
This repository was 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

@Xindi-Li

Description

@Xindi-Li

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions