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

OverlayTrigger namespace propTypes does not match the OverlayTriggerProps interface #6708

Closed
3 tasks done
snstanton opened this issue Oct 17, 2023 · 0 comments · Fixed by #6709
Closed
3 tasks done
Labels

Comments

@snstanton
Copy link
Contributor

Prerequisites

Describe the bug

In OverlayTrigger.d.ts, the namespace OverlayTrigger declaration contains a var propTypes that does not match the OverlayTriggerProps declaration in the same file. The optional properties are declared as required in the namespace. This leads to type confusion in tools like the WebStorm IDE.

Expected behavior

The optional properties should be declared optional in the propTypes declaration.

To Reproduce

No response

Reproducible Example

https://codesandbox.io/s/beautiful-dream-lwcm96

Screenshots

No response

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

Chrome

What version of React-Bootstrap are you using?

2.9.0

What version of Bootstrap are you using?

5.3.2

Additional context

No response

@snstanton snstanton added the bug label Oct 17, 2023
kyletsang pushed a commit that referenced this issue Oct 21, 2023
…6709)

* Convert OverlayTrigger to an arrow function to fix type issues

Fixes #6708

* Use React.FC to suppress propTypes exports in the .d.ts file
Fix type mismatches

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

Successfully merging a pull request may close this issue.

1 participant