material-tailwind icon indicating copy to clipboard operation
material-tailwind copied to clipboard

Card/CardHeader/CardBody/CardFooter : xxx is missing the following properties from type 'Pick '

Open d-wojciechowski opened this issue 2 years ago • 6 comments

Hello,

Great lib! On version change from 1.2.4 -> 2.0.1 I started to encounter in WebStorm the following error:

TS2739: Type '{ children: Element[]; className: string; }' is missing the following properties from type 'Pick ': nonce, onResize, onResizeCapture

image

Is there anything I am missing from configuration side? I am not very skilled with FE (this is my first attempt ;) ).

Best Regards, Dominik Wojciechowski

d-wojciechowski avatar Jun 03 '23 18:06 d-wojciechowski

I am having this exact same issue on my input component. I am sure it's the same for other components as well. Would love to see this get fixed.

Screenshot 2023-06-09 at 9 51 16 PM

curtisknudson avatar Jun 10 '23 03:06 curtisknudson

same issue

lifeoasis-chudee avatar Jun 19 '23 06:06 lifeoasis-chudee

same issue on Slider component

Harrylever avatar Jun 25 '23 14:06 Harrylever

On Vscode I added the following attributes and the error/red squiggly line disappeared: From this:

<Slider
  id="pitch"
  min="0.5"
  max="2"
  defaultValue="1"
  step="0.1"
  color="amber"
  onChange={(e) => {
    setPitch(Number(e.target.value));
  }}
/>

To this:

<Slider
  id="pitch"
  min="0.5"
  max="2"
  defaultValue="1"
  step="0.1"
  color="amber"
  onChange={(e) => {
    setPitch(Number(e.target.value));
  }}
  nonce={undefined}
  onResize={undefined}
  onResizeCapture={undefined}
/>

So I decided to convert it to this:

<Slider
  id="pitch"
  min="0.5"
  max="2"
  defaultValue="1"
  step="0.1"
  color="amber"
  onChange={(e) => {
    setPitch(Number(e.target.value));
  }}
  nonce={undefined}
  onResize={() => {}}
  onResizeCapture={() => {}}
/>

In case someone might want to try this.

Harrylever avatar Jun 25 '23 15:06 Harrylever

Try updating your packages, in my case, I only had to update typescript to 5.2.2, React to 18.2.0, and @types/react to 18.2.21.

HendryXX1 avatar Sep 14 '23 14:09 HendryXX1