-
-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Breaking change from @types/react@18.2.61 #1045
Comments
A similar issue with This component is not assignable to const EmployeesList = forwardRef<HTMLDivElement, ListProps>(({ children, ...restProps }, ref) => (
<div className='employees-list' {...restProps} ref={ref}>
{children}
</div>
));
<Virtuoso
className='grid-table-body scrollbar-light-theme'
data={sortedEmployeesList}
components={{ List: EmployeesList }}
overscan={500}
itemContent={(_, employee) => renderEmployeeRow(employee)}
/> With the TypeScript error:
|
🎉 This issue has been resolved in version 4.7.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I still see a similar error with
with
Am I doing something wrong? |
@fdw import type { ComponentPropsWithoutRef } from 'react'
import { forwardRef } from 'react'
import type { TableComponents } from 'react-virtuoso'
import Paper from '@mui/material/Paper'
import Table from '@mui/material/Table'
import TableBody from '@mui/material/TableBody'
import TableContainer from '@mui/material/TableContainer'
import TableFooter from '@mui/material/TableFooter'
import TableHead from '@mui/material/TableHead'
import TableRow from '@mui/material/TableRow'
const VirtuosoTableComponents: TableComponents = {
TableFoot: forwardRef((props: ComponentPropsWithoutRef<'tfoot'>, ref) => (
<TableFooter ref={ref} {...props} />
)),
Scroller: forwardRef((props: ComponentPropsWithoutRef<'div'>, ref) => (
<TableContainer ref={ref} component={Paper} {...props} />
)),
Table,
TableHead: forwardRef((props: ComponentPropsWithoutRef<'thead'>, ref) => (
<TableHead ref={ref} {...props} />
)),
TableRow,
TableBody: forwardRef((props: ComponentPropsWithoutRef<'tbody'>, ref) => (
<TableBody ref={ref} {...props} />
)),
} |
That was quick! Thank you! 🙂 |
Describe the bug
DefinitelyTyped/DefinitelyTyped#68720 has caused a breaking change.
Reproduction
Scroller
andTableBody
are not the right type.Expected behavior
No typescript error
The text was updated successfully, but these errors were encountered: