Skip to content

Commit 4b1d800

Browse files
committed
prettier fix
1 parent 5942a2a commit 4b1d800

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • src/frontend/src/pages/ProjectDetailPage/ProjectViewContainer/BOM

src/frontend/src/pages/ProjectDetailPage/ProjectViewContainer/BOM/BOMTable.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const BOMTable: React.FC<BOMTableProps> = ({ setHideColumn, assignMaterial, colu
6969
assemblyMaterials.forEach((material, indx) => materialsWithAssemblies.push(materialToRow(material, indx)));
7070
});
7171

72+
// drag and drop mechanics
7273
const handleDragStart = (materialId: string) => {
7374
const material = materials.find((m) => m.materialId === materialId);
7475
if (material) {
@@ -120,6 +121,7 @@ const BOMTable: React.FC<BOMTableProps> = ({ setHideColumn, assignMaterial, colu
120121
>
121122
<BomStyledDataGrid
122123
onColumnVisibilityModelChange={(model: GridColumnVisibilityModel) => {
124+
//store a state inside a parent array (array in a parent class), and then every time the state changes, update the parent state, add another part that, on reload, we check the parent state and update the child state
123125
const tempColumns: boolean[] = [];
124126
Object.keys(model).forEach((toDelete) => {
125127
tempColumns.push(!model[toDelete]);

0 commit comments

Comments
 (0)