Skip to content
This repository has been archived by the owner on Dec 14, 2024. It is now read-only.

Commit

Permalink
log DTypes of columns and data used
Browse files Browse the repository at this point in the history
  • Loading branch information
a10y committed Dec 4, 2024
1 parent d92c609 commit 496447e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"vite": "^6.0.1"
},
"dependencies": {
"a10y-vortex": "^0.2.0",
"a10y-vortex": "^0.3.0",
"apache-arrow": "^18.1.0",
"gridjs": "^6.2.0"
},
Expand Down
10 changes: 10 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,17 @@ vortexLoad().then(() => {
const gridElem = document.getElementById("data-grid")!;
gridElem.innerHTML = ``;

for (let i = 0; i < sliced.columns().length; i++) {
const name = sliced.columns()[i];
const dtype = sliced.types()[i];
console.log(`column: ${name} (${dtype})`);
}

console.log("using data", sliced.to_js());

if (grid != undefined) {
grid.updateConfig({
resizable: true,
columns: sliced.columns(),
data: sliced.to_js(),
pagination: {
Expand All @@ -53,6 +62,7 @@ vortexLoad().then(() => {
grid.forceRender();
} else {
grid = new Grid({
resizable: true,
columns: sliced.columns(),
data: sliced.to_js(),
pagination: {
Expand Down

0 comments on commit 496447e

Please sign in to comment.