From 8923ddbbd2a81c5eeae589cc200900a5187de4dd Mon Sep 17 00:00:00 2001 From: Rising Odegua Date: Fri, 25 Feb 2022 11:27:08 +0100 Subject: [PATCH] Add extra properties to Table component --- src/components/views/Table.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/Table.js b/src/components/views/Table.js index 8e15f578..e64278a0 100644 --- a/src/components/views/Table.js +++ b/src/components/views/Table.js @@ -7,14 +7,14 @@ import PropTypes from 'prop-types'; * @param columns: An array of column names with properties: e.g [{field: "col1", headerName: "col1"}, {field: "col2", headerName: "col2"}] * @param data: an array of data objects e.g. [ {col1: 1, col2: 2}, {col1: 5, col2: 7} ] */ -const Table = ({ columns, data }) => { +const Table = ({ columns, data, height, width }) => { let rows = [...data,] rows = rows.map((row, i) => { row['id'] = i return row }) return ( -
+
);