Skip to content

Commit

Permalink
fix: fix issuses
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-ovo committed Mar 29, 2024
1 parent 1c1ce39 commit 2ec09fc
Show file tree
Hide file tree
Showing 10 changed files with 3,437 additions and 3,414 deletions.
8 changes: 7 additions & 1 deletion src/table/TBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export default function TBody(props: TableBodyProps) {
'rowHeight',
'scrollType',
];

data?.forEach((row, rowIndex) => {
const trProps = {
...pick(props, TABLE_PROPS),
Expand All @@ -158,7 +159,12 @@ export default function TBody(props: TableBodyProps) {
}

const trNode = (
<TR key={get(row, props.rowKey || 'id') || rowIndex} {...trProps} onRowMounted={props.handleRowMounted}></TR>
<TR
key={get(row, props.rowKey || 'id') || rowIndex}
{...trProps}
onRowMounted={props.handleRowMounted}
rowClassName={[trProps.rowClassName, allTableClasses.tableBaseClass.row]}
></TR>
);
trNodeList.push(trNode);

Expand Down
40 changes: 20 additions & 20 deletions src/table/__tests__/__snapshots__/pagination.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`BaseTable Pagination > locale data pagination controlled > both pagination.pageSize and pagination.current changed 1`] = `
NodeList [
<tr
class=""
class="t-table__row-even t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -22,7 +22,7 @@ NodeList [
</td>
</tr>,
<tr
class=""
class="t-table__row-odd t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -41,7 +41,7 @@ NodeList [
</td>
</tr>,
<tr
class=""
class="t-table__row-even t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -60,7 +60,7 @@ NodeList [
</td>
</tr>,
<tr
class=""
class="t-table__row-odd t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -77,7 +77,7 @@ NodeList [
/>
</tr>,
<tr
class=""
class="t-table__row-even t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -101,7 +101,7 @@ NodeList [
exports[`BaseTable Pagination > locale data pagination controlled > pagination.current changed 1`] = `
NodeList [
<tr
class=""
class="t-table__row-even t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -120,7 +120,7 @@ NodeList [
</td>
</tr>,
<tr
class=""
class="t-table__row-odd t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -139,7 +139,7 @@ NodeList [
</td>
</tr>,
<tr
class=""
class="t-table__row-even t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -158,7 +158,7 @@ NodeList [
</td>
</tr>,
<tr
class=""
class="t-table__row-odd t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -175,7 +175,7 @@ NodeList [
/>
</tr>,
<tr
class=""
class="t-table__row-even t-table__row"
>
<td
class="table-test-column-index"
Expand Down Expand Up @@ -258,7 +258,7 @@ exports[`BaseTable Pagination > locale data pagination controlled > pagination.c
class="t-table__body"
>
<tr
class=""
class="t-table__row-even t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -277,7 +277,7 @@ exports[`BaseTable Pagination > locale data pagination controlled > pagination.c
</td>
</tr>
<tr
class=""
class="t-table__row-odd t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -296,7 +296,7 @@ exports[`BaseTable Pagination > locale data pagination controlled > pagination.c
</td>
</tr>
<tr
class=""
class="t-table__row-even t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -313,7 +313,7 @@ exports[`BaseTable Pagination > locale data pagination controlled > pagination.c
/>
</tr>
<tr
class=""
class="t-table__row-odd t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -332,7 +332,7 @@ exports[`BaseTable Pagination > locale data pagination controlled > pagination.c
</td>
</tr>
<tr
class=""
class="t-table__row-even t-table__row"
>
<td
class="table-test-column-index"
Expand Down Expand Up @@ -535,7 +535,7 @@ exports[`BaseTable Pagination > locale data pagination controlled > pagination.c
exports[`BaseTable Pagination > locale data pagination controlled > pagination.pageSize changed 1`] = `
NodeList [
<tr
class=""
class="t-table__row-even t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -554,7 +554,7 @@ NodeList [
</td>
</tr>,
<tr
class=""
class="t-table__row-odd t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -573,7 +573,7 @@ NodeList [
</td>
</tr>,
<tr
class=""
class="t-table__row-even t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -592,7 +592,7 @@ NodeList [
</td>
</tr>,
<tr
class=""
class="t-table__row-odd t-table__row"
>
<td
class="table-test-column-index"
Expand All @@ -609,7 +609,7 @@ NodeList [
/>
</tr>,
<tr
class=""
class="t-table__row-even t-table__row"
>
<td
class="table-test-column-index"
Expand Down
Loading

0 comments on commit 2ec09fc

Please sign in to comment.