diff --git a/packages/standard-components/components.json b/packages/standard-components/components.json index 20929de9f4..d19b2ad85f 100644 --- a/packages/standard-components/components.json +++ b/packages/standard-components/components.json @@ -240,7 +240,7 @@ }, "height": { "type": "number", - "default": "500" + "default": "540" }, "pagination": { "type": "bool", diff --git a/packages/standard-components/src/DataGrid/Component.svelte b/packages/standard-components/src/DataGrid/Component.svelte index baaebf20aa..4d51da2b4d 100644 --- a/packages/standard-components/src/DataGrid/Component.svelte +++ b/packages/standard-components/src/DataGrid/Component.svelte @@ -81,19 +81,29 @@ autoHeight: true, } }) - columnDefs = [...columnDefs, { - headerName: 'Details', - field: '_id', - width: 25, - flex: 0, - editable: false, - sortable: false, - cellRenderer: getRenderer({ - type: '_id', - options: detailUrl - }), - autoHeight: true, - }] + + if (detailUrl) { + columnDefs = [ + ...columnDefs, + { + headerName: "Detail", + field: "_id", + minWidth: 100, + width: 100, + flex: 0, + editable: false, + sortable: false, + cellRenderer: getRenderer({ + type: "_id", + options: detailUrl, + }), + autoHeight: true, + pinned: "left", + filter: false, + }, + ] + } + dataLoaded = true } }) @@ -148,7 +158,7 @@ href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css" /> -