Skip to content

The open alternative to Salesforce, designed for AI.

Fixing last column width in table-view (#7258)

sid0-089b50c020f4b
diff --git a/packages/twenty-front/src/modules/object-record/record-table/components/RecordTable.tsx b/packages/twenty-front/src/modules/object-record/record-table/components/RecordTable.tsx
index 7f76f10a55a..ccec1297bf3 100644
--- a/packages/twenty-front/src/modules/object-record/record-table/components/RecordTable.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-table/components/RecordTable.tsx
@@ -13,10 +13,8 @@ import { useRecoilValue } from 'recoil';
const StyledTable = styled.table`
border-radius: ${({ theme }) => theme.border.radius.sm};
border-spacing: 0;
- margin-right: ${({ theme }) => theme.table.horizontalCellMargin};
table-layout: fixed;
-
- width: calc(100% - ${({ theme }) => theme.table.horizontalCellMargin} * 2);
+ width: 100%;
`;
type RecordTableProps = {
diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableTd.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableTd.tsx
index 49f51197db1..5aca062fbac 100644
--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableTd.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableTd.tsx
@@ -43,8 +43,8 @@ const StyledTd = styled.td<{
${({ freezeFirstColumns }) =>
freezeFirstColumns
? `@media (max-width: ${MOBILE_VIEWPORT}px) {
- width: 35px;
- max-width: 35px;
+ width: 32px;
+ max-width: 32px;
}`
: ''}
`;
diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderLastColumn.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderLastColumn.tsx
index 0a548ae5f8d..8a87fd63c56 100644
--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderLastColumn.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderLastColumn.tsx
@@ -19,7 +19,6 @@ const StyledPlusIconHeaderCell = styled.th<{
&:hover {
background: ${theme.background.transparent.light};
};
- padding-left: ${theme.spacing(3)};
`;
}};
border-bottom: 1px solid ${({ theme }) => theme.border.color.light};
@@ -28,12 +27,12 @@ const StyledPlusIconHeaderCell = styled.th<{
border-left: none !important;
color: ${({ theme }) => theme.font.color.tertiary};
min-width: 32px;
+ width: 32px;
border-right: none !important;
${({ isTableWiderThanScreen, theme }) =>
isTableWiderThanScreen
? `
- width: 32px;
background-color: ${theme.background.primary};
`
: ''};
@@ -45,7 +44,7 @@ const StyledPlusIconContainer = styled.div`
display: flex;
height: 32px;
justify-content: center;
- width: 32px;
+ width: 100%;
`;
const HIDDEN_TABLE_COLUMN_DROPDOWN_HOTKEY_SCOPE_ID =