Skip to content

The open alternative to Salesforce, designed for AI.

Fix boardcard selected state and fix table new row being added on top

Charles Bochet5fdd8e079342
diff --git a/front/src/modules/companies/components/CompanyBoardCard.tsx b/front/src/modules/companies/components/CompanyBoardCard.tsx
index 9af12643578..08bd59aed4f 100644
--- a/front/src/modules/companies/components/CompanyBoardCard.tsx
+++ b/front/src/modules/companies/components/CompanyBoardCard.tsx
@@ -40,7 +40,7 @@ const StyledBoardCard = styled.div<{ selected: boolean }>`
cursor: pointer;
.checkbox-container {
- opacity: 0;
+ opacity: ${({ selected }) => (selected ? 1 : 0)};
}
&:hover .checkbox-container {
diff --git a/front/src/modules/ui/table/hooks/useUpsertTableRowId.ts b/front/src/modules/ui/table/hooks/useUpsertTableRowId.ts
index a812f811d0c..0a8d519af77 100644
--- a/front/src/modules/ui/table/hooks/useUpsertTableRowId.ts
+++ b/front/src/modules/ui/table/hooks/useUpsertTableRowId.ts
@@ -10,7 +10,7 @@ export function useUpsertTableRowId() {
.getLoadable(tableRowIdsState)
.valueOrThrow();
- set(tableRowIdsState, Array.from(new Set([...currentRowIds, rowId])));
+ set(tableRowIdsState, Array.from(new Set([rowId, ...currentRowIds])));
},
[],
);