score:0
Accepted answer
given your description of the dataset this might be a possible solution:
<table>
<tablehead>
<tablerow>
{a.map((column, index) => (
<tablecell key={index}>{column.name}</tablecell>
))}
</tablerow>
</tablehead>
<tablebody>
{a[0].values.map((_, rowindex) => (
<tablerow key={rowindex}>
{a.map((row, colindex) => (
<tablecell key={colindex}>
{row.values[rowindex]}
</tablecell>
))}
</tablerow>
))}
</tablebody>
</table>
note that this requires every entry in your data set to have the exact same amount of values and there must be at least one entry in the list.
basically it takes the number of expected values for each row from the length of the list of values of the first item in your data set. this seem very fishy to me and is very likely a flaw in your concept. tables are row based and the number of rows should be the number of entries in your list.
Source: stackoverflow.com
Related Query
- Building a table using material ui In react
- React Material table editing using hooks
- Using Buttons in React Material UI Table
- Not able to add, update, delete rows in material table react using class based component. Previously it was working with functional component
- How can I change font size of pagination part in material table using react js?
- is there a way to add a <label></label> to every column header using Material Table React
- Type error when using render when defining table columns in material table React
- Dynamic Table in react using material ui
- How can I add hyperlink to table head column entries in react using material ui table?
- in what way display database table to material ui table by using node as backend and react as frontend
- average total value of columns in table using react hooks with material UI
- How to make the whole Card component clickable in Material UI using React JS?
- React Router V4 Implement NavLink inside a ListItem using Material UI
- Using Material Design Lite with React
- Expandable table in React material ui
- Using ref with React Hooks in Ant design (antd) Table component with customized filters
- Can react js web code be used for building mobile apps using react native?
- Something went wrong with react table using typescript
- React material table automatic page size
- Need to navigate link while clicking material ui table row in React Router 4
- Limiting table selects not working - material UI table - react
- Test a onClose callback from dialog when using material UI & react testing library?
- Building timeline for video editor using React JS
- React material ui table can't get element from row
- React Material UI Autocomplete using React Hook Forms issue
- How to make the API call and display it in React JS using React Table and Axios?
- How to add floating action button on the right-bottom side of the screen using material ui in react
- React with Material UI Table Pagination show all entries
- Using React Date Range picker to filter a React table
- React Material Table action button markup overriding for multiple actions
More Query from same tag
- React - Prevent focus going out of modal when tabbing
- Missing sourcemaps in Typescript + Webpack project
- React/Next clock example not working on localhost
- How to use <Link> to change pathname of location with HashRouter
- In react how to detect the button id clicked on not
- react dynamically override child render
- Why does Cypress not recognise the testid of a react-datepicker element?
- how to to insert TradingView widget into react js which is in script tag link: https://www.tradingview.com/widget/market-overview/
- Display component produced by function, replacing previous component on screen
- How to navigate nested components with react-router 4
- How do I delete an Item from an array save on local storage?
- Return component data using switch and Hooks
- React Router v4 everything in the Router component re-renders on every route change
- Default value for `localeDetection`
- React for displaying the log file in real-time (Flask backend)
- How do I properly test input change events with Enzyme?
- React Component not correctly reloading on stateChange
- how to capture x axis and y-axis value in anychart
- Mouse pointer cannot detect element to trigger onClick()
- How does React re-use child components / keep the state of child components when re-rendering the parent component?
- Create a react-component as wrapper for content
- React Query return undefined data while in network tab the data exists but it does not show on the page
- react componentDidMount not firing
- SPA 404 on Refresh: Go+React App on Heroku
- Typechecking nested object properties with PropType
- Updating a list of objects in a list of objects immutably
- material-ui overlay div behind Drawer Component
- Props are undefined in React
- How To Detect Decimal as a Number in React
- using map in collapsible table reactjs