Skip to content

Commit 2fa7382

Browse files
committed
Fix cell viewer
1 parent 6b53d82 commit 2fa7382

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

public/build/app.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/app.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Cell.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react'
22
import { parquetDataFrame } from '../tableProvider.js'
33
import Layout from './Layout.js'
44
import { asyncBufferFromUrl, parquetMetadataAsync } from 'hyparquet'
5+
import { asyncRows } from 'hightable'
56

67
enum LoadingState {
78
NotLoaded,
@@ -43,10 +44,10 @@ export default function CellView() {
4344
setProgress(0.75)
4445
const df = await parquetDataFrame(from, metadata)
4546
const rows = await df.rows(row, row + 1)
46-
const colName = df.header[col]
47-
const cell = rows[0][colName]
48-
const text = stringify(cell)
49-
console.log('cell', cell, text)
47+
// Convert to AsyncRows
48+
const asyncRow = asyncRows(rows, 1, df.header)[0]
49+
// Await cell data
50+
const text = await asyncRow[df.header[col]].then(stringify)
5051
setText(text)
5152
} catch (error) {
5253
setError(error as Error)

0 commit comments

Comments
 (0)