Skip to content

Commit 8747a68

Browse files
committed
fix: -< sudio: Edge @in and @out properties are not hyperlinks
Fixed issue ArcadeData#3718
1 parent 17d8b42 commit 8747a68

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

studio/src/main/resources/static/js/studio-table.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function renderTable() {
5656
if (columns["@out"]) orderedColumns.push("@out");
5757

5858
for (let i in orderedColumns) {
59-
if (orderedColumns[i] == "@rid")
59+
if (orderedColumns[i] == "@rid" || orderedColumns[i] == "@in" || orderedColumns[i] == "@out")
6060
tableColumns.push({
6161
title: escapeHtml(orderedColumns[i]),
6262
render: function (data, type, full) {
@@ -89,9 +89,12 @@ function renderTable() {
8989
let colName = orderedColumns[i];
9090
let value = row[colName];
9191

92-
if (colName == "@rid") {
92+
if (colName == "@rid" && value != null) {
9393
//RID
9494
value = "<a class='link' onclick=\"openRecordEditorFromTable('" + value + "')\">" + value + "</a>";
95+
} else if ((colName == "@in" || colName == "@out") && typeof value === "string" && value.charAt(0) === "#") {
96+
//RID reference (edges only; on vertices these are numeric counts)
97+
value = "<a class='link' onclick=\"openRecordEditorFromTable('" + value + "')\">" + value + "</a>";
9598
} else if (value != null && (typeof value === "string" || value instanceof String) && value.toString().length > 30) {
9699
if (tableTruncateColumns) value = value.toString().substr(0, 30) + "...";
97100
}

0 commit comments

Comments
 (0)