UNPKG

reactjs-simple-table

Version:

Reactjs simple table for showing list of data with sorting and pagation

21 lines (19 loc) 599 B
import React from "react"; const BodyTableComponent = ({ data, columnsData }) => { return /*#__PURE__*/React.createElement("tbody", null, data?.map((item, i) => /*#__PURE__*/React.createElement("tr", { key: i }, columnsData?.map((col, j) => { //if (col.type === "text") { return /*#__PURE__*/React.createElement("td", { key: j }, /*#__PURE__*/React.createElement("span", null, item[col.field])); // } else if (col.type === "") { // return <td key={j}></td>; //} else { // return <td key={j}></td>; //} })))); }; export default BodyTableComponent;