@@ -94,12 +119,16 @@ export function ProductionListTable({
/>
)}
- columns={columns.map((c) => {
+ columns={columns.map((c, index) => {
return {
...c,
sortOrder:
state.sortedInfo.columnKey === c.key && state.sortedInfo.order,
title: headerItem(c),
+ onHeaderCell: (column) => ({
+ width: column.width,
+ onResize: handleResize(index),
+ }),
};
})}
rowKey='id'
@@ -141,11 +170,7 @@ export function ProductionListTable({
const classes = [];
if (!!record.scheduled_completion) {
if (new Date(record.scheduled_completion) - Now < OneCalendarDay)
- console.log(
- "new Date(record.scheduled_completion) - Now < OneCalendarDay",
- new Date(record.scheduled_completion) - Now < OneCalendarDay
- );
- classes.push("production-completion-1");
+ classes.push("production-completion-1");
}
return classes.join(" ");
}} //TODO What could be good usage here?
diff --git a/client/src/components/production-list-table/production-list-table.resizeable.component.jsx b/client/src/components/production-list-table/production-list-table.resizeable.component.jsx
new file mode 100644
index 000000000..996a08418
--- /dev/null
+++ b/client/src/components/production-list-table/production-list-table.resizeable.component.jsx
@@ -0,0 +1,11 @@
+import React from "react";
+import { Resizable } from "react-resizable";
+
+export default (props) => {
+ const { onResize, width, ...restProps } = props;
+ return (
+