From 9bd5dbc73461b367e647c850b360c446ca97eba9 Mon Sep 17 00:00:00 2001 From: Tyler Jordan Wright Date: Wed, 23 Sep 2020 12:06:51 -0400 Subject: [PATCH] Pre UI update --- src/components/ItemTable/ItemTable.js | 68 ++++++++++++++++++++++----- 1 file changed, 56 insertions(+), 12 deletions(-) diff --git a/src/components/ItemTable/ItemTable.js b/src/components/ItemTable/ItemTable.js index dbd01ea..20616e6 100644 --- a/src/components/ItemTable/ItemTable.js +++ b/src/components/ItemTable/ItemTable.js @@ -1,12 +1,14 @@ import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types' -import MaterialTable from "material-table"; +import MaterialTable, { MTableCell,MTableBodyRow } from "material-table"; +import { Card, CardContent, Typography } from '@material-ui/core'; + export default function ItemTable({ setActiveItem, setSidebarOpen }) { const columns = [ { title: 'Queue', field: 'queue', filterPlaceholder: "Ex: \"ME\"" }, - { title: 'Item #', field: 'number', filterPlaceholder: "Ex: \"42\"" }, + { title: 'Item #', field: 'number', filterPlaceholder: "Ex: \"42\""}, { title: 'From', field: 'userAlias', filterPlaceholder: "Ex: \"campb303\"" }, { title: 'Assigned To', field: 'assignedTo', filterPlaceholder: "Ex: \"sundeep\"" }, { title: 'Subject', field: 'subject', filterPlaceholder: "Ex: \"Install Libraries\"" }, @@ -26,31 +28,73 @@ export default function ItemTable({ setActiveItem, setSidebarOpen }) { }) }, []) + + + const options = { "filtering": true, "paging": false, "search": false, "draggable": false, "padding": "dense", + + } + + return ( - { - setActiveItem(rowData); - setSidebarOpen(true); - }} - /> + <> + { + setActiveItem(rowData); + setSidebarOpen(true); + }} + style={{ + + }} + components={{ + // Cell: props => ( + + // + // + // + // + // + + // ), + Row: props => ( + + + + + + + + ), + }} + + + /> + + + ); } + + + + + ItemTable.propTypes = { /** Function to set active item on row click. */ "setActiveItem": PropTypes.func.isRequired, /** Function to toggle sidebar on row click. */ "setSidebarOpen": PropTypes.func.isRequired } +