Unverified Commit 83b14de1 authored by Daniel's avatar Daniel Committed by GitHub

Added `row` and `()` to possible nested columns (#347)

* Added `row` and `()` to possible nested columns
parent f8e129a8
...@@ -58,7 +58,7 @@ export class ColumnListItem extends React.Component<ColumnListItemProps, ColumnL ...@@ -58,7 +58,7 @@ export class ColumnListItem extends React.Component<ColumnListItemProps, ColumnL
}; };
renderColumnType = (columnIndex: number, type: string) => { renderColumnType = (columnIndex: number, type: string) => {
const truncatedTypes: string[] = ['array', 'struct', 'map']; const truncatedTypes: string[] = ['array', 'struct', 'map', 'row'];
let shouldTrucate = false; let shouldTrucate = false;
const fullText = type.toLowerCase(); const fullText = type.toLowerCase();
...@@ -67,7 +67,14 @@ export class ColumnListItem extends React.Component<ColumnListItemProps, ColumnL ...@@ -67,7 +67,14 @@ export class ColumnListItem extends React.Component<ColumnListItemProps, ColumnL
truncatedTypes.forEach((truncatedType) => { truncatedTypes.forEach((truncatedType) => {
if (type.startsWith(truncatedType) && type !== truncatedType) { if (type.startsWith(truncatedType) && type !== truncatedType) {
shouldTrucate = true; shouldTrucate = true;
const lastChar = type.charAt(type.length - 1);
if (lastChar === '>'){
text = `${truncatedType}<...>`; text = `${truncatedType}<...>`;
} else if (lastChar === ')') {
text = `${truncatedType}(...)`;
} else {
text = `${truncatedType}...`;
}
return; return;
}; };
}); });
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
.resource-type { .resource-type {
flex-basis: 100px; flex-basis: 100px;
overflow: hidden;
} }
.badges { .badges {
// placeholder // placeholder
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment