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

fix(Overlay): Fix types and overlay example #5275

Merged
merged 1 commit into from
Jul 7, 2020

Conversation

kyletsang
Copy link
Member

Resolves #4717

@@ -17,9 +17,13 @@ export interface OverlayInjectedProps {
style: React.CSSProperties;
'aria-labelledby'?: string;

arrowProps: { ref: any; style: object };
arrowProps: {
ref: React.RefCallback<HTMLElement>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we explicitly expecting this to be a ref callback? why can't it just be typed as any valid ref?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay well I don't understand why the types for react-overlays is that way either 😛 it should be allowed to pass in any valid refs for that feature.

But this is something we'd have to fix in react-overlays first so for now it makes sense for them to be the same type.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I was wondering about the ref typing as well, but didn't have enough time for a deep dive into RO today.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kyletsang kyletsang merged commit f14ca04 into react-bootstrap:master Jul 7, 2020
@kyletsang kyletsang deleted the fix/types-overlay branch July 10, 2020 20:27
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

Successfully merging this pull request may close these issues.

Overlay TypeScript definition is incomplete and untested
3 participants