Skip to content

Commit

Permalink
Fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgros committed Jan 6, 2025
1 parent a4bf611 commit 607469f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { styled } from '@mui/material'
import { Cell, Row, Table } from '@tanstack/react-table'
import { identity } from 'lodash-es'
import { memo } from 'react'
Expand Down Expand Up @@ -72,6 +73,11 @@ type TableBodyPropsRowOverride<
'rows' | 'rowTransform'
>

// Simple wrapper around 'tr' to prevent forwarding invalid HTML attributes
const TableRow = styled('tr', {
shouldForwardProp: prop => prop !== 'row' && prop !== 'tableRow',
})({})

export type TableBodyProps<TData = unknown, TRowType = Row<TData>> = {
/** The table instance */
table: Table<TData>
Expand All @@ -98,7 +104,7 @@ export function TableBody<TData = unknown, TRowType = Row<TData>>(

const {
Tbody = 'tbody',
Tr = 'tr',
Tr = TableRow,
TableCellRenderer = DefaultTableCellRenderer<TData>,
} = slots
const { Tbody: tbodySlotProps = {}, Tr: _trSlotProps = {} } = slotProps
Expand Down

0 comments on commit 607469f

Please sign in to comment.