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

[Popper] Incompatible props: onResize and onResizeCapture #35287

Closed
2 tasks done
mbmx10 opened this issue Nov 29, 2022 · 59 comments · Fixed by #36013
Closed
2 tasks done

[Popper] Incompatible props: onResize and onResizeCapture #35287

mbmx10 opened this issue Nov 29, 2022 · 59 comments · Fixed by #36013
Assignees
Labels
bug 🐛 Something doesn't work component: Popper The React component. See <Popup> for the latest version. external dependency Blocked by external dependency, we can’t do anything about it package: material-ui Specific to @mui/material typescript

Comments

@mbmx10
Copy link

mbmx10 commented Nov 29, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Link to live example:

Steps:

  1. Use dependencies @mui/lab:.0.0-alpha.110 and @mui/material:5.10.16
  2. Render a Autocomplete Component with property PopperComponent={popperProps => <Popper {...popperProps} />

Current behavior 😯

Typescript error:
Type '{ anchorEl: HTMLDivElement | undefined; style: { width: number | undefined; }; key?: Key | null | undefined; className?: string | undefined; component?: "div" | undefined; ... 268 more ...; sx?: SxProps<...> | undefined; }' is missing the following properties from type 'Pick<PopperProps, "key" | "className" | "style" | "component" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | ... 265 more ... | "onResizeCapture">': onResize, onResizeCapture

PopperUnstyledOwnProps in mui/base does not provide the onResize and onResizeCapture props picked by the mui/material
Popper components props

Expected behavior 🤔

No Typescript error

Context 🔦

We have to pin @mui/material to version 5.10.15 in order to build our project even though we would prefer to do minor upgrades automatically.

Workaround

See #35287 (comment).

Your environment 🌎

System:
OS: Linux 5.10 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
Binaries:
Node: 16.18.1 - ~/.nvm/versions/node/v16.18.1/bin/node
Yarn: 3.2.0 - ~/.nvm/versions/node/v16.18.1/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v16.18.1/bin/npm
Browsers:
Chrome: Not Found
Firefox: 106.0.2
npmPackages:
@emotion/react: 11.10.5
@emotion/styled: 11.10.5
@mui/base: 5.0.0-alpha.108
@mui/core-downloads-tracker: 5.10.16
@mui/icons-material: 5.10.16
@mui/lab: 5.0.0-alpha.110
@mui/material: 5.10.16
@mui/private-theming: 5.10.16
@mui/styled-engine: 5.10.16
@mui/styles: 5.10.16
@mui/system: 5.10.16
@mui/types: 7.2.2
@mui/utils: 5.10.16
@types/react: ^17.0.44 => 17.0.52
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
typescript: ~4.6.4 => 4.6.4

@mbmx10 mbmx10 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 29, 2022
@thibaultadet
Copy link

I have the same issue on Popper and Timeline components after updating Mui packages to latest version:

  • "@mui/icons-material": "^5.10.16"
  • "@mui/lab": "^5.0.0-alpha.110"
  • "@mui/material": "^5.10.16"
  • "@mui/styles": "^5.10.16"

same Typescript error:
Type '{ children: Element[]; sx: { p: number; }; }' is missing the following properties from type 'Pick<TimelineProps, "classes" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | ... 252 more ... | "onResizeCapture">': nonce, onResize, onResizeCapture

@mbmx10 mbmx10 changed the title Incompatible Popper props, onResize onResize Incompatible Popper props, onResize onResizeCapture Nov 29, 2022
@heath-freenome
Copy link
Contributor

heath-freenome commented Nov 29, 2022

Definitely wasn't expecting a patch release to blow up my build... getting this:

node_modules/@mui/material/Popper/Popper.d.ts:36:73 - error TS2344: Type '"key" | "id" | "open" | "color" | "container" | "transition" | "translate" | "hidden" | "slot" | "style" | "title" | "dir" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | ... 256 more ... | "componentsProps"' does not satisfy the constraint '"key" | "id" | "open" | "color" | "container" | "transition" | "translate" | "hidden" | "slot" | "style" | "title" | "dir" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | ... 255 more ... | "componentsProps"'.
  Type '"onResize"' is not assignable to type '"key" | "id" | "open" | "color" | "container" | "transition" | "translate" | "hidden" | "slot" | "style" | "title" | "dir" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | ... 255 more ... | "componentsProps"'. Did you mean '"onReset"'?

36 declare const Popper: React.ForwardRefExoticComponent<Pick<PopperProps, "hidden" | "color" | "style" | "open" | "translate" | "transition" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "sx" | "components" | "container" | "placement" | "disablePortal" | "modifiers" | "anchorEl" | "keepMounted" | "popperOptions" | "popperRef" | "slotProps" | "slots" | "componentsProps"> & React.RefAttributes<HTMLDivElement>>;

@hortizgarrido

This comment was marked as resolved.

@zannager zannager added the component: Popper The React component. See <Popup> for the latest version. label Nov 30, 2022
@IdoiaRojo
Copy link

Same here
Captura de pantalla 2022-11-30 a las 14 32 27

@IdoiaRojo
Copy link

Not working either with 5.10.15 or 5.10.14

@Primajin
Copy link
Contributor

Primajin commented Nov 30, 2022

<Popper
  onResize={undefined}
  onResizeCapture={undefined}
  ...
/>

will mitigate the issue until future fix 😉

Although this might throw in your tests:

Warning: Unknown event handler property `onResizeCapture`. It will be ignored.

😕

@IdoiaRojo
Copy link

In my case the problem is that I can't even build the project using vite.js, I'm not using directly Popper

@Primajin
Copy link
Contributor

Primajin commented Dec 1, 2022

@IdoiaRojo If you don't use Popper, this also happens on Timeline and probably other components though.

@RyanBarclay
Copy link

RyanBarclay commented Dec 1, 2022

Can confirm I am seeing this on popper when bumping versions up between this version of MUI

5.10.16

    "@mui/icons-material": "5.10.16",
    "@mui/material": "5.10.16",
    "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest",
    "@mui/styles": "5.10.16",
    "@mui/x-date-pickers": "5.0.9", 

Screenshot 2022-12-01 at 2 34 02 PM

src/components/elements/PopperMenu/index.tsx:37:6 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(props: Omit<Omit<Pick<PopperProps, "children" | "style" | "title" | "slot" | "id" | "color" | "key" | "components" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | ... 262 more ... | "onResizeCapture"> & RefAttributes<...>, never> & Partial<...>, "theme"> & { ...; } & { ...; }): ReactElement<...>', gave the following error.
    Type '{ children: Element; placement: Placement | undefined; open: boolean; anchorEl: any; ref: Ref<any>; }' is missing the following properties from type 'Omit<Omit<Pick<PopperProps, "children" | "style" | "title" | "slot" | "id" | "color" | "key" | "components" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | ... 262 more ... | "onResizeCapture"> & RefAttributes<...>, never> & Partial<...>, "theme">': nonce, onResize, onResizeCapture
  Overload 2 of 2, '(props: StyledComponentPropsWithAs<ForwardRefExoticComponent<Pick<PopperProps, "children" | "style" | "title" | "slot" | "id" | "color" | "key" | "components" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | ... 262 more ... | "onResizeCapture"> & RefAttributes<...>>, DefaultTheme, {}, never, ForwardRefExoticComponent<...>>): ReactElement<...>', gave the following error.
    Type '{ children: Element; placement: Placement | undefined; open: boolean; anchorEl: any; ref: Ref<any>; }' is missing the following properties from type 'Omit<Omit<Pick<PopperProps, "children" | "style" | "title" | "slot" | "id" | "color" | "key" | "components" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | ... 262 more ... | "onResizeCapture"> & RefAttributes<...>, never> & Partial<...>, "theme">': nonce, onResize, onResizeCapture

37     <Popper

5.10.15

    "@mui/icons-material": "5.10.15",
    "@mui/material": "5.10.15",
    "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest",
    "@mui/styles": "5.10.15",
    "@mui/x-date-pickers": "5.0.9",

Screenshot 2022-12-01 at 2 43 18 PM

yarn run v1.22.19
$ tsc -p tsconfig.test.json
✨  Done in 35.37s.

I.E. a patch release w/ no release note about Breaking changes should be hot fixed/prioritized with the last minor being reverted and rereleased to not break auto bumping from builds.

@RyanBarclay
Copy link

RyanBarclay commented Dec 1, 2022

@michaldudak @oliviertassinari
Just wanted to bump this because you have a bit of context w/ Popper/Autocomplete component in (#35160)

This blew up a few of our CI's because this break was updated in the latest patch release.

@m4theushw
Copy link
Member

m4theushw commented Dec 2, 2022

Could you upgrade @types/react to latest version (v18.0.25) and check if the error is gone? These onResize and onResizeCapture were added recently in DefinitelyTyped/DefinitelyTyped#63076. My guess is that because of this change MUI only works now with @types/react: ^18.0.25.

@JonasDoe
Copy link

JonasDoe commented Dec 2, 2022

Could you upgrade @types/react to latest version (v18.0.25) and check if the error is gone? These onResize and onResizeCapture were added recently in DefinitelyTyped/DefinitelyTyped#63076. My guess is that because of this change MUI only works now with @types/react: ^18.0.25.

Couldn't test it b/c that requires react 18. Speaking for us, we're not there yet, and just made it to MUI 5 (more ore less). But at least when updating to @types/react v17.0.52 (the latest for react 17) the problem remains.

@ZeeshanTamboli
Copy link
Member

ZeeshanTamboli commented Dec 3, 2022

Tagging @mui/core since it looks like a high priority issue. I am not certain if it's related to #35273. Also not sure what's the fix but I think we need to support latest version of @types/react for React 17 as well. It would be compatible for MUI users using React 17.

@hbjORbj hbjORbj changed the title Incompatible Popper props, onResize onResizeCapture [Popper] Incompatible props: onResize and onResizeCapture Dec 4, 2022
@michaldudak
Copy link
Member

I'm looking into it.

@michaldudak
Copy link
Member

I understand it occurs only when using React 17, right?
I wasn't able to reproduce it using 18 (https://codesandbox.io/s/agitated-mestorf-eheb0b?file=/src/App.tsx).

@michaldudak
Copy link
Member

michaldudak commented Dec 5, 2022

It seems that the issue is caused by a type mismatch between @types/react@17 and @types/react@18.
As a workaround, you can add the following module augmentation code to your projects:

declare global {
  namespace React {
    interface DOMAttributes<T> {
      onResize?: ReactEventHandler<T> | undefined;
      onResizeCapture?: ReactEventHandler<T> | undefined;
      nonce?: string | undefined;
    }
  }
}

Solving this "properly" is a pickle, to be honest. Apparently DefinitelyTyped can't add these two fields to React 17 typings, because they are only supported in 18. We may have to live with this workaround for longer, unfortunately.

@ZeeshanTamboli ZeeshanTamboli added external dependency Blocked by external dependency, we can’t do anything about it typescript and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 6, 2022
@JonasDoe
Copy link

JonasDoe commented Dec 6, 2022

Minor addition: I had to do the same approach with the nonce property, i.e. declaring nonce?: string | undefined;, which probably not the cleanest way since DOMAttribute doesn't come with that property at all.

@olliebatch
Copy link

Just to help ^ this also occurs on react 18 unless using the latest react/types - upgrading that removed this for me

@cherniavskii
Copy link
Member

@michaldudak

How about using @types/react@18 with react@17 as an alternative solution to this issue?
Are there any downsides to this?

@MartinYankovPP
Copy link

Sorry, I'm not a familiar with the development workflow here and would like to ask when is expected to be release ?

@alleksei37
Copy link

alleksei37 commented Feb 1, 2023

Same here, works fine with React 18.2.0 and @types/react 18.0.26. Thanks @kurtwaldowski-echelon

I can't confirm that unfortunately. I am using React 18.2.0 and @types/react 18.0.26 and the problem is still present

I also wasn't able to fix the problem with @types/react 18.0.26 at first but knowing that the TS compiler in VS Code is stubborn at times I restarted VS Code and the problem has gone now.

@JonasDoe
Copy link

JonasDoe commented Feb 1, 2023

"@mui/material": "https://pkg.csb.dev/mui/material-ui/commit/05fd9443/@mui/material"

Works for me with react v17.0.2! Great job!

@mx-bernhard
Copy link

mx-bernhard commented Feb 1, 2023

"@mui/material": "https://pkg.csb.dev/mui/material-ui/commit/05fd9443/@mui/material"

Looks good in our project. We're using react v17.0.2 as well. I am a colleague of @mbmx10

@michaldudak
Copy link
Member

I made some additional changes. Could you please once again verify the build? The latest bits are available at https://pkg.csb.dev/mui/material-ui/commit/ff29f383/@mui/material

Sorry, I'm not a familiar with the development workflow here and would like to ask when is expected to be release ?

@MartinYankovPP once the PR is approved, I'll merge it, and it'll land in the next release. We usually release new versions on Mondays, so there's a chance it'll be the next one.

@JonasDoe
Copy link

JonasDoe commented Feb 1, 2023

https://pkg.csb.dev/mui/material-ui/commit/ff29f383/@mui/material

Haven't done much testing, but tsc says everything is fine. 👍

@MartinYankovPP
Copy link

I made some additional changes. Could you please once again verify the build? The latest bits are available at https://pkg.csb.dev/mui/material-ui/commit/ff29f383/@mui/material

Sorry, I'm not a familiar with the development workflow here and would like to ask when is expected to be release ?

@MartinYankovPP once the PR is approved, I'll merge it, and it'll land in the next release. We usually release new versions on Mondays, so there's a chance it'll be the next one.

Thanks, the new commit also looks good to me. At least doesn't make any problems for the build.

@RobinTail
Copy link

RobinTail commented Feb 2, 2023

I think that Pick causes this issue, mentioning properties that are not supposed to be there in React 17.

The type declaration using Pick looks crazy to me. Perhaps, instead of picking so much, you could just omit something you don't wanna be there?

Would it be possible to rewrite the type declaration using Omit instead of Pick?

from Timeline.d.ts:
declare const Timeline: React.ForwardRefExoticComponent<Pick<TimelineProps, "slot" | "style" | "title" | "hidden" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "position" | "sx"> & React.RefAttributes<HTMLUListElement>>;

@michaldudak
Copy link
Member

The Pick<> comes from React types (PropsWithoutRef is defined as such), and we have no control over its shape. However, its possible to specify the return type without using PropsWithoutRef, which is what I'm doing in #36013

@PeterKottas
Copy link

Is this now deployed? I can still see the error on

    "@mui/material": "^5.11.7",

@MartinYankovPP
Copy link

Is this now deployed? I can still see the error on

    "@mui/material": "^5.11.7",

Not yet, you can see release notes here, so far it's not included, maybe next Monday :)

https://github.com/mui/material-ui/releases/tag/v5.11.7

@PeterKottas
Copy link

Cheers! I've just seen it merged to master so I immediately thought it went out.

@michaldudak
Copy link
Member

It's just been released in https://github.com/mui/material-ui/releases/tag/v5.11.8

@PeterKottas
Copy link

Awesome, thanks!

@bartvde
Copy link

bartvde commented Feb 7, 2023

I'm using 5.11.8 but still hitting this TS error (using tsc version 4.7.4, react 17.0.2)

@roman-kuleshov
Copy link

Just upgraded to "@mui/material": "5.11.9" - still having this issue.

@michaldudak
Copy link
Member

Is the Popper causing the issue or some other component?
Also, could you please run npx @mui/envinfo and paste its output here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: Popper The React component. See <Popup> for the latest version. external dependency Blocked by external dependency, we can’t do anything about it package: material-ui Specific to @mui/material typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.