Skip to content

Commit 0e0ad7d

Browse files
committed
fix: fix column size and padding in configs tables
Fixes #2363
1 parent 30d627c commit 0e0ad7d

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

src/components/Configs/ConfigList/MRTConfigListColumn.tsx

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export const mrtConfigListColumns: MRT_ColumnDef<ConfigItem>[] = [
3838
</div>
3939
);
4040
},
41-
minSize: 200,
42-
size: 270,
41+
minSize: 300,
42+
size: 400,
4343
enableGrouping: true,
4444
enableSorting: true,
4545
enableHiding: false,
@@ -78,7 +78,7 @@ export const mrtConfigListColumns: MRT_ColumnDef<ConfigItem>[] = [
7878
{
7979
header: "Type",
8080
accessorKey: "type",
81-
size: 170,
81+
size: 250,
8282
enableSorting: true,
8383
enableHiding: true,
8484
enableColumnActions: false,
@@ -89,8 +89,7 @@ export const mrtConfigListColumns: MRT_ColumnDef<ConfigItem>[] = [
8989
{
9090
header: "Status",
9191
accessorKey: "health",
92-
minSize: 100,
93-
maxSize: 180,
92+
minSize: 200,
9493
enableSorting: true,
9594
enableColumnActions: false,
9695
Cell: ({ cell, row }) => {
@@ -133,7 +132,7 @@ export const mrtConfigListColumns: MRT_ColumnDef<ConfigItem>[] = [
133132

134133
return <ChangeCountIcon count={value} />;
135134
},
136-
size: 70,
135+
size: 200,
137136
meta: {
138137
cellClassName: "overflow-hidden"
139138
},
@@ -150,7 +149,6 @@ export const mrtConfigListColumns: MRT_ColumnDef<ConfigItem>[] = [
150149
filterByTagParamKey="labels"
151150
/>
152151
),
153-
maxSize: 300,
154152
minSize: 100
155153
},
156154
{
@@ -212,9 +210,7 @@ export const mrtConfigListColumns: MRT_ColumnDef<ConfigItem>[] = [
212210
/>
213211
</div>
214212
);
215-
},
216-
minSize: 50,
217-
maxSize: 100
213+
}
218214
},
219215
{
220216
header: "Cost",
@@ -231,22 +227,21 @@ export const mrtConfigListColumns: MRT_ColumnDef<ConfigItem>[] = [
231227
},
232228
Cell: ({ row }) => {
233229
return <ConfigCostValue config={row.original} popover={false} />;
234-
},
235-
maxSize: 60
230+
}
236231
},
237232
{
238233
header: "Created",
239234
accessorKey: "created_at",
240235
enableColumnActions: false,
241236
Cell: MRTConfigListDateCell,
242-
maxSize: 70
237+
maxSize: 100
243238
},
244239
{
245240
header: "Updated",
246241
accessorKey: "updated_at",
247242
enableColumnActions: false,
248243
Cell: MRTConfigListDateCell,
249-
maxSize: 70
244+
maxSize: 100
250245
},
251246
{
252247
header: "Deleted At",

src/components/Configs/ConfigsTypeIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export type ConfigIconProps = {
1313

1414
export default function ConfigsTypeIcon({
1515
config,
16-
className = "w-4 h-4",
16+
className = "w-4",
1717
showPrimaryIcon = true,
1818
showSecondaryIcon = true,
1919
showLabel = false,

src/ui/MRTDataTable/MRTDataTable.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,13 @@ export default function MRTDataTable<T extends Record<string, any> = {}>({
135135
rowsPerPageOptions: ["50", "100", "200"]
136136
},
137137
mantineExpandButtonProps: {
138-
size: "xs"
138+
size: 20
139139
},
140140
mantineExpandAllButtonProps: {
141-
size: "xs"
141+
size: 20
142142
},
143-
renderDetailPanel
143+
renderDetailPanel,
144+
displayColumnDefOptions: { "mrt-row-expand": { size: 5 } } //change width of actions column to 300px
144145
});
145146

146147
return <MantineReactTable table={table} />;

0 commit comments

Comments
 (0)