Skip to content

Commit

Permalink
add default columns, rows array
Browse files Browse the repository at this point in the history
  • Loading branch information
karooolis committed Oct 24, 2024
1 parent bf1f103 commit 435056d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export function useTableDataQuery({ table, query }: Props) {
const rows = result.slice(1).map((row) => Object.fromEntries(columnKeys.map((key, index) => [key, row[index]])));

return {
columns: columnKeys,
rows,
columns: columnKeys || [],
rows: rows || [],
};
},
enabled: !!table && !!query,
Expand Down

0 comments on commit 435056d

Please sign in to comment.