react-sticky-table: Uncaught in promise TypeError: row.type is not a constructor

I just tried to replace my dynamical <table> with the <StickyTable/> but it doesn’t work. Sometimes I see the error

Uncaught in promise TypeError: row.type is not a constructor

Or sometimes the error

Uncaught TypeError: Cannot read property ‘getBoundingClientRect’ of null

I didn’t find a solution yet.

Code :


<div className="table-container">
<StickyTable className="table table-sm table-striped table-hover">
       {this.state.rows.map((line, i) => {
              return (
                    <Row key={i}>
                           {line.map((cell, j) => <Cell key={j} onClick={() => this.handlePeopleClick(cell.personNumber)}>{this.getFormatedValue(cell,j)}</Cell>)}
                     </Row>
                 )
         })}
</StickyTable>
</div>

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 20 (11 by maintainers)

Most upvoted comments

Gotcha - makes sense that it’s causing an error. I don’t have the bandwidth to patch and old version, but might be able to add support for multiple columns on the latest version today. I’ll give it a go later.