Skip to content

Commit aea4ca6

Browse files
committed
feat(LibraryNavigator): fixed failing tests
1 parent 84130a2 commit aea4ca6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

client/src/connection/itc/ItcLibraryAdapter.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,20 @@ class ItcLibraryAdapter implements LibraryAdapter {
115115
start: number,
116116
limit: number,
117117
): Promise<TableData> {
118+
// We only need the columns for the first page of results
119+
const columns =
120+
start === 0
121+
? {
122+
columns: ["INDEX"].concat(
123+
(await this.getColumns(item)).items.map((column) => column.name),
124+
),
125+
}
126+
: {};
127+
118128
const { rows } = await this.getRows(item, start, limit);
119129

130+
rows.unshift(columns);
131+
120132
// Fetching csv doesn't rely on count. Instead, we get the count
121133
// upfront via getTableRowCount
122134
return { rows, count: -1 };

0 commit comments

Comments
 (0)