question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'headerText' of undefined

See original GitHub issue

I’m getting this error when I add search to my table.

TypeError: Cannot read property 'headerText' of undefined at http://localhost:3000/static/js/bundle.js:102201:27 at Array.map (native) at BootstrapTable.renderToolBar (http://localhost:3000/static/js/bundle.js:102197:31) at BootstrapTable.render (http://localhost:3000/static/js/bundle.js:101417:27) at http://localhost:3000/static/js/bundle.js:26822:22 at measureLifeCyclePerf (http://localhost:3000/static/js/bundle.js:26101:13) at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (http://localhost:3000/static/js/bundle.js:26821:26) at ReactCompositeComponentWrapper._renderValidatedComponent (http://localhost:3000/static/js/bundle.js:26848:33)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
AllenFangcommented, Apr 4, 2017

ok, I got the problem, if you use map for creating the TableHeaderColumn, please do not doing this

<BootstrapTable data={ products } search={ true } options={ options }>
   <TableHeaderColumn dataField='id' isKey dataSort={true}>Product ID</TableHeaderColumn>
   { columns }
</BootstrapTable>

Please use following, if you feel isKey is noisy, you can use keyField on BootstrapTable instead.

<BootstrapTable data={ products } search={ true } options={ options } keyField='id'>
   { columns }
</BootstrapTable>

Let me know if the problem still remain, thanks

1reaction
shyjalcommented, Apr 4, 2017

@AllenFang I enabled exportCSV and got this issue. Moved all TableHeaderColumn components inside map like you mentioned,now the issue is solved. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'headers' of undefined on ...
The collect function attempts to access req. headers , but you didn't pass a request, so it's undefined. Hence the error: "Cannot read...
Read more >
Error Cannot read property 'header' of undefined - Blazor
It is a Tab control "without" the tab content, only header. The error happens when AddPage is called.
Read more >
Cannot read property 'headers' of undefined [resolved]
Hi! This error is caused by having an image url in your app that does not return appropriate headers, which then causes an...
Read more >
Header: Cannot read property 'map' of undefined
Hi Experts, I am using Consume API service to make a POST/PATCH call. I have passed x-csrf-token and cookie to the request.
Read more >
Fetch Updates Error - Cannot read property 'header...
Fetch Updates Error - Cannot read property 'headers' of undefined. 191. 12. a month ago. GIS_Admin. by GIS_Admin. New Contributor II.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found