Skip to content

Commit 9c8480d

Browse files
committed
changes to table config
1 parent 1f197d6 commit 9c8480d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scot-ui/src/list/tableConfig.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ const columnDefinitions = {
199199
Id: {
200200
Header: "ID",
201201
accessor: "id",
202-
maxWidth: 100,
202+
maxWidth: 80,
203203
Filter: customFilters.numberFilter
204204
},
205205

@@ -457,12 +457,12 @@ const columnDefinitions = {
457457
Status: {
458458
accessor: "status",
459459
Header: "Status",
460-
maxWidth: 100,
460+
maxWidth: 70,
461461
Cell: customCellRenderers.alertStatusAlerts
462462
},
463463

464464
EntryCountColumn: {
465-
width: 102,
465+
width: 95,
466466
resizable: true,
467467
expander: true,
468468
filter: false,
@@ -747,7 +747,10 @@ export const getColumnWidth = (data, accessor, headerText) => {
747747
return 210;
748748
} else {
749749
if (newtext.includes("entity")) {
750-
magicLength = 30;
750+
//lets count the number of occurences of entity
751+
let entitycount = (newtext.match(new RegExp("entity", "g")) || [])
752+
.length;
753+
magicLength = 10 * entitycount;
751754
newtext = newtext.replace(/<[^>]*>?/g, "");
752755
}
753756
//return ctx.measureText(newtext).width;

0 commit comments

Comments
 (0)