diff --git a/packages/builder/src/components/backend/DataTable/Table.svelte b/packages/builder/src/components/backend/DataTable/Table.svelte index 825ed6af7b..959f343546 100644 --- a/packages/builder/src/components/backend/DataTable/Table.svelte +++ b/packages/builder/src/components/backend/DataTable/Table.svelte @@ -100,6 +100,7 @@ }, headerName: value.displayFieldName || key, field: key, + autocolumn: !!value.autocolumn, sortable: true, cellRenderer: getRenderer({ schema: schema[key], @@ -114,8 +115,8 @@ minWidth: 200, }) } - - columnDefs = result + // sort auto-columns to the end if they are present + columnDefs = result.filter(col => !col.autocolumn).concat(result.filter(col => col.autocolumn)) } function selectRelationship(row, fieldName) { diff --git a/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte b/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte index f6ef036f40..49d342dd71 100644 --- a/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte +++ b/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte @@ -59,8 +59,13 @@ on:mouseover={() => (hovered = true)} on:mouseleave={() => (hovered = false)}>