Skip to content

Commit d1f9f0b

Browse files
committed
add identifier for numeral cells
1 parent 987ac76 commit d1f9f0b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/table.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Table extends React.Component<{ id: string }, DataState> {
5656
<tr key={row.get("id")}>
5757
{this.state.cols.map(col => {
5858
return (
59-
<td>{row.get(col)}</td>
59+
<td className={typeof row.get(col) == "number" ? "num" : ""}>{row.get(col)}</td>
6060
)
6161
})}
6262
</tr>
@@ -70,9 +70,9 @@ class Table extends React.Component<{ id: string }, DataState> {
7070
<table className="notion-table">
7171
<thead>
7272
<tr key={this.state.id}>
73-
{this.state.cols.map(col => {
73+
{this.state.cols.map((col, i) => {
7474
return (
75-
<th>{col.replace(/([0-9]+\ )/, "")}</th>
75+
<th key={i}>{col.replace(/([0-9]+\ )/, "")}</th>
7676
)
7777
})}
7878
</tr>

0 commit comments

Comments
 (0)