diff --git a/src/cableEstimator/cableMounting.tsx b/src/cableEstimator/cableMounting.tsx index e4913fc..4ea84e7 100644 --- a/src/cableEstimator/cableMounting.tsx +++ b/src/cableEstimator/cableMounting.tsx @@ -66,11 +66,11 @@ export default function CableMounting(props: Props) { rows={bin.CableSums} columns={columns} page={0} - pageSize={0} + pageSize={5} handleRowsPerPageChange={()=>{}} setPage={()=>{}} total={0} - hidePagination + //hidePagination /> ) } diff --git a/src/cableEstimator/cableTable.tsx b/src/cableEstimator/cableTable.tsx index a0913e5..51f4473 100644 --- a/src/cableEstimator/cableTable.tsx +++ b/src/cableEstimator/cableTable.tsx @@ -133,11 +133,11 @@ export default function CableTable(props: Props) { columns={columns} rows={cableData} page={0} - pageSize={0} + pageSize={5} total={0} setPage={()=>{}} handleRowsPerPageChange={()=>{}} - hidePagination + //hidePagination /> ); } diff --git a/src/common/ResponsiveTable.tsx b/src/common/ResponsiveTable.tsx index cee700c..9d39ff8 100644 --- a/src/common/ResponsiveTable.tsx +++ b/src/common/ResponsiveTable.tsx @@ -91,7 +91,7 @@ interface Props { selectedRows?: number[]; //which rows are selected will need to be controlled by the parent in order to keep track between page changes customElement?: JSX.Element //element that will be placed in the table head between the table actions and the column header rows mobileView?: boolean //can be used to force the table to use its mobile view for narrow containing elements ie, drawer - hidePagination?: boolean //when passed in will hide the pagination at the bottom of the table + //hidePagination?: boolean //when passed in will hide the pagination at the bottom of the table } export default function ResponsiveTable(props: Props) { @@ -120,7 +120,7 @@ export default function ResponsiveTable(props: Props) { selectedRows, customElement, mobileView, - hidePagination + //hidePagination } = props const classes = useStyles(); const columns = typeof(props.columns) === "function" ? props.columns() : props.columns @@ -141,10 +141,6 @@ export default function ResponsiveTable(props: Props) { return saved ? JSON.parse(saved) : []; }); - useEffect(()=>{ - console.log("ResponsiveTable rows: " + rows.toString()) - },[rows]) - useEffect(() => { localStorage.setItem(filterKey, JSON.stringify(filterList)); }, [filterList]) @@ -353,7 +349,7 @@ export default function ResponsiveTable(props: Props) { ) })} - {/* {rows.length < 1 && + {rows.length < 1 && (!isLoading ? { noDataMessage ? noDataMessage : "No data."} @@ -363,7 +359,7 @@ export default function ResponsiveTable(props: Props) { ) - } */} + } ) @@ -427,7 +423,7 @@ export default function ResponsiveTable(props: Props) { { rowSelect && } { renderGutter && } - {/* { columns ? + { columns ? columns.map((column, index) => { if (filterList.includes(column.title) || column.hidden) return null return ( @@ -444,7 +440,7 @@ export default function ResponsiveTable(props: Props) { ) }) - } */} + } @@ -522,7 +518,7 @@ export default function ResponsiveTable(props: Props) { ) }) } - {/* {rows.length < 1 && !isLoading && + {rows.length < 1 && !isLoading && @@ -530,10 +526,10 @@ export default function ResponsiveTable(props: Props) { - } */} + } - {!hidePagination && + {/* {!hidePagination && */} (props: Props) { onPageChange={(_event, page) => handlePageChange(page)} onRowsPerPageChange={handleRowsPerPageChange} /> - } + {/* } */}