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

Typescript CollapsibleProps doesn't contain childre #436

Open
teyalite opened this issue May 1, 2022 · 15 comments
Open

Typescript CollapsibleProps doesn't contain childre #436

teyalite opened this issue May 1, 2022 · 15 comments

Comments

@teyalite
Copy link

teyalite commented May 1, 2022

There is no property children?: React.ReactNode; in CollapsibleProps.

@mohandarsi
Copy link

image

@MikeyAlmighty
Copy link

Hi @teyalite Did you find a potential workaround for this?

@teyalite
Copy link
Author

teyalite commented Jun 1, 2022

@MikeyAlmighty yes, i added the child prop to it in the source file in node_modules

@kaolin
Copy link

kaolin commented Jun 1, 2022

FWIW ~

diff --git a/node_modules/react-native-collapsible/index.d.ts b/node_modules/react-native-collapsible/index.d.ts
index 26f8d56..7acf736 100644
--- a/node_modules/react-native-collapsible/index.d.ts
+++ b/node_modules/react-native-collapsible/index.d.ts
@@ -93,6 +93,12 @@ export interface CollapsibleProps {
    * Function called when the animation finished
    */
   onAnimationEnd?: () => void;
+
+  /**
+   * Children! https://github.com/oblador/react-native-collapsible/issues/436
+   */
+  children?: React.ReactNode;
+
 }

 export default class Collapsible extends React.Component<CollapsibleProps> {}

@kubik369
Copy link

This is due to the update to React 18, where children props need to be stated in the type explicitly.

@oblador Would you accept a PR with this single change? AFAIK it does not affect older versions. Thanks for the reply :)

@Andreas-Sujono
Copy link

@oblador still get this issue

@marioacero
Copy link

@oblador could you add that fix?

@makarewicz77
Copy link

I'm also facing the issue and would appreciate a fix for this one. I'm not considering changing the index.d.ts from node_modules as a proper solution.

@bobness
Copy link

bobness commented Aug 30, 2022

Same. Please fix! I'll put @ts-expect-error for now... 👿

@doug-shontz
Copy link

I see this has been merged in a PR. #432. Could it please be published?

@kvika-kristin
Copy link

@oblador This is still causing a problem, would it be possible to publish a new version including the fix that was merged in #432 ?

@oscar-shamrock
Copy link

this has been fixed?

@oscar-shamrock
Copy link

ii saw is merged but when i install the package is not fixed

@bads77
Copy link

bads77 commented Feb 11, 2023

Hi, any plans on fixing this?

@stevekuznetsov
Copy link

Looks like v1.6.1 released that fix. @oblador we can close this issue out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests