Skip to content

Commit

Permalink
fix: terminal ui table keys
Browse files Browse the repository at this point in the history
  • Loading branch information
kyscott18 committed Jun 17, 2024
1 parent e5cc2f7 commit 3c1dbc2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/core/src/ui/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export function Table<TRow extends { [key: string]: any }>(props: {
<Box flexDirection="row" key="border">
<Text></Text>
{columnWidths.map((width, index) => (
<Text key={`separator-${width}`}>
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
<Text key={index}>
{"─".repeat(width + 2)}
{index < columns.length - 1 ? "┼" : "┤"}
</Text>
Expand All @@ -73,13 +74,12 @@ export function Table<TRow extends { [key: string]: any }>(props: {
{formattedRows.map((row, rowIndex) => (
<Box
flexDirection="row"
key={`row-${
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
rowIndex
}`}
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
key={rowIndex}
>
{columns.map(({ key, align }, index) => (
<React.Fragment key={`cell-${rowIndex}-${row[key]}`}>
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
<React.Fragment key={index}>
<Text></Text>
<Box
width={columnWidths[index]}
Expand Down

0 comments on commit 3c1dbc2

Please sign in to comment.