component property is not on TablePaginationProps
See original GitHub issueThe documentation shows that component
is a property of type TablePaginationProps. Instantiating an object of this type does not allow for this property.
Issue potentially because of this line: https://github.com/mui-org/material-ui/blob/c19917c0bee7ddc1980ec48891c13297965c5542/packages/material-ui/src/TablePagination/TablePagination.d.ts#L66
- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate. Issue was closed because report was not in proper format https://github.com/mui-org/material-ui/issues/15959
Current Behavior 😯
a Typescript error is shown
Object literal may only specify known properties, and 'component' does not exist in type
Expected Behavior 🤔
The property should be available on TablePaginationProps
type (or documentation should be updated to reflect the removal of this property)
Steps to Reproduce 🕹
https://codesandbox.io/s/material-demo-forked-fv6nu?file=/demo.tsx
Steps:
import TablePagination, { TablePaginationProps } from "@material-ui/core/TablePagination";
- instantiate variable of type
TablePaginationProps
- include
component
property in object
Context 🔦
I am trying to wrap the TablePagination component and export it together with its proptype
Your Environment 🌎
`npx @material-ui/envinfo`
Don't forget to mention which browser you used.
Output from `npx @material-ui/envinfo` goes here.
System: OS: macOS 11.1 Binaries: Node: 14.3.0 - /usr/local/bin/node Yarn: 1.22.5 - ~/.yarn/bin/yarn npm: 6.14.4 - /usr/local/bin/npm Browsers: Chrome: 87.0.4280.141 Edge: 87.0.664.75 Firefox: 85.0 Safari: 14.0.2 npmPackages: @emotion/styled: 10.0.27 @material-ui/core: ^4.11.0 => 4.11.1 @material-ui/icons: ^4.9.1 => 4.9.1 @material-ui/lab: ^4.0.0-alpha.56 => 4.0.0-alpha.56 @material-ui/pickers: ^3.2.10 => 3.2.10 @material-ui/styles: ^4.10.0 => 4.11.1 @material-ui/system: 4.9.14 @material-ui/types: 5.1.0 @material-ui/utils: 4.10.2 @types/react: latest => 17.0.0 react: ^16.13.1 => 16.14.0 react-dom: ^16.13.1 => 16.14.0 styled-components: ^5.2.0 => 5.2.1 typescript: latest => 4.1.2
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:5 (3 by maintainers)
Still going on for sure (among other prop type errors that get reported when dropping the example from the docs directly into an empty .tsx file). Very peculiar as I would expect to be able to drop the example code directly into a blank file w/ no (or at least very minimal) errors reported.
@probablyVincentIp Thanks for the hint 👍 Updated to refer to https://github.com/mui-org/material-ui/issues/15827