Dynamic table columns
See original GitHub issuePossible that I’m being slow (react newbie), but I’m having an issue creating dynamic columns (from other posts, it looks like it’s possible!):
My code is as follows: `
<BootstrapTable data={this.state.tableData}>
<TableHeaderColumn dataField="location" dataSort={true}
isKey={true}>Location</TableHeaderColumn>
{
this.state.tableColumns.map(function (elem, index) {
return <TableHeaderColumn dataField={period} key={index} dataSort={true}>{periodtxt}
</TableHeaderColumn>
})
}
</BootstrapTable>
` However, this gives me a “Cannot read property ‘dataField’ of undefined” - it appears the child doesn’t have any props.
Any ideas what I’m doing wrong?
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Power BI - Dynamic Columns in a Table - YouTube
What's up guys! Parker here. In this video, I take you through a quick tutorial to demonstrate how to set up dynamic columns...
Read more >Table Records with dynamic columns | OutSystems
Hi guys, I need to have table records where the columns are dynamic and I have no more ideas on how to do...
Read more >Creating Dynamic Columns | Power Query Challenge - YouTube
Download Data - https://goodly.co.in/wp-content/uploads/2022/07/Create- Dynamic - Columns -Power-Query-Output.xlsx➜ Post Your Answers Here ...
Read more >Table dynamically changing the columns displayed - StackBlitz
Table dynamically changing the columns displayed.
Read more >Create a table with dynamic columns - Cubewise CODE
The objective is to create a table with rows and columns driven by a subset. By having your table driven by subsets, you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That did the trick - thanks @AllenFang and @rpastorelle !
thanks your repsponse @rpastorelle, and @adamtay82 you can check this issue, it’s absolutely same as yours