From 3eb4cceb54aa998f42699008951c7743067952f5 Mon Sep 17 00:00:00 2001 From: "Alinson S. Xavier" Date: Tue, 9 Sep 2025 12:11:54 -0500 Subject: [PATCH] web: Clean up console logs and reset active cell after edit --- web/src/components/Common/Forms/DataTable.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/src/components/Common/Forms/DataTable.tsx b/web/src/components/Common/Forms/DataTable.tsx index e246393..8dfcec4 100644 --- a/web/src/components/Common/Forms/DataTable.tsx +++ b/web/src/components/Common/Forms/DataTable.tsx @@ -407,7 +407,6 @@ const DataTable = (props: DataTableProps) => { const height = computeTableHeight(data); if (tableRef.current === null) { - console.log("new Tabulator"); tableRef.current = new Tabulator(tableContainerRef.current, { layout: "fitColumns", data: data, @@ -426,6 +425,10 @@ const DataTable = (props: DataTableProps) => { const activeRowPosition = activeCell?.getRow().getPosition() as number; const activeField = activeCell?.getField(); + if (activeCell) { + console.log(activeCell.getValue()); + } + // Update data tableRef.current.replaceData(newData).then(() => {}); @@ -472,7 +475,6 @@ const DataTable = (props: DataTableProps) => { // Set new callbacks tableRef.current.on("cellEditing", (cell) => { - console.log("cellEditing", cell); setActiveCell(cell); }); @@ -481,6 +483,7 @@ const DataTable = (props: DataTableProps) => { }); tableRef.current.on("cellEdited", (cell) => { + setActiveCell(null); onCellEdited(cell); }); }