You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Property 'ref' does not exist on type 'IntrinsicAttributes & ButtonGroupProps'."
Possible fix would be to change the type definition to: export declare const ButtonGroup: React.ForwardRefExoticComponent<React.PropsWithChildren<ButtonGroupProps> & React.RefAttributes<HTMLDivElement>>;
That would also remove the explicit property children?: React.ReactNode | undefined; from the ButtonGroupProps interface.
And just a small tip here: If you use property?: with question mark it's already the shortcut for "| undefined"
melloware
added
Typescript
Issue or pull request is *only* related to TypeScript definition
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Apr 9, 2024
Describe the bug
"Property 'ref' does not exist on type 'IntrinsicAttributes & ButtonGroupProps'."
Possible fix would be to change the type definition to:
export declare const ButtonGroup: React.ForwardRefExoticComponent<React.PropsWithChildren<ButtonGroupProps> & React.RefAttributes<HTMLDivElement>>;
That would also remove the explicit property
children?: React.ReactNode | undefined;
from the ButtonGroupProps interface.And just a small tip here: If you use property?: with question mark it's already the shortcut for "| undefined"
If you want I can open a PR for that.
Reproducer
https://stackblitz.com/edit/vitejs-vite-tmipcz?file=src%2FApp.tsx,package.json
PrimeReact version
10.6.3
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
The text was updated successfully, but these errors were encountered: