Skip to content
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

component property is not on TablePaginationProps #24372

Closed
2 tasks done
confirmedVincentIp opened this issue Jan 11, 2021 · 5 comments
Closed
2 tasks done

component property is not on TablePaginationProps #24372

confirmedVincentIp opened this issue Jan 11, 2021 · 5 comments
Labels
component: table This is the name of the generic UI component, not the React module! typescript

Comments

@confirmedVincentIp
Copy link

The 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

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:

  1. import TablePagination, { TablePaginationProps } from "@material-ui/core/TablePagination";
  2. instantiate variable of type TablePaginationProps
  3. 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

@confirmedVincentIp confirmedVincentIp added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 11, 2021
@oliviertassinari oliviertassinari added typescript and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 11, 2021
@jqrun
Copy link
Contributor

jqrun commented Mar 15, 2021

+1, problem still persist in @material-ui/[email protected]

@cchooley
Copy link

cchooley commented May 4, 2021

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.

Screen Shot 2021-05-04 at 10 08 28 AM

@oliviertassinari oliviertassinari added the component: table This is the name of the generic UI component, not the React module! label May 8, 2021
@eps1lon
Copy link
Member

eps1lon commented Jun 16, 2021

Thanks for the report.

Closing in favor of #15827 which is the same underlying issue.

@eps1lon eps1lon closed this as completed Jun 16, 2021
@confirmedVincentIp
Copy link
Author

@eps1lon

Closing in favor of #24372

I believe you are referring to this issue itself :)

@eps1lon
Copy link
Member

eps1lon commented Jun 16, 2021

@probablyVincentIp Thanks for the hint 👍 Updated to refer to #15827

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: table This is the name of the generic UI component, not the React module! typescript
Projects
None yet
Development

No branches or pull requests

5 participants