Skip to content

[v6] Externalize columns data array #2287

Discussion options

You must be logged in to vote

I have solved that problem as

I was not able to find perfect solution but workaround mentioned below was good enough for me to achieve what I was looking for.

I have created common table headers index file which contains all locations for table headers:

tableHeaders.jsx

let tablelHeaders = {};

tableHeaders['propA'] = require('../tableA/tableAheaders.jsx').default;
tableHeaders['propB'] = require('../tableB/tableBheaders.jsx').default;
tableHeaders['propC'] = require('../tableB/tableCheaders.jsx').default;
...
tableHeaders['propX'] = require('../tableX/tableXheaders.jsx').default;

export default tableHeaders

and then in the view for the main component specify prop for that:

<MyTable tab…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by raszkiewicz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant