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

refactor(all): normalize ref handling #4438

Merged
merged 8 commits into from
Jan 11, 2021

Conversation

ejose19
Copy link
Contributor

@ejose19 ejose19 commented Nov 30, 2020

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

  • Normalize ref usage so components accept both ref object and callback, instead of just a callback.
  • Centralize the ref handling logic so it can be reused in all components.
  • Use exact HTML element type (ie HTMLDivElement) on ref typing (instead of HTMLElement) when they're known.

@ejose19 ejose19 changed the title Ej/improve input refs refactor(all): normalize ref handling Nov 30, 2020
packages/core/src/common/refs.ts Outdated Show resolved Hide resolved
@ejose19 ejose19 requested a review from adidahiya January 8, 2021 16:46
@adidahiya
Copy link
Contributor

The new implementation looks fine, can you resolve the conflicts please?

@ejose19
Copy link
Contributor Author

ejose19 commented Jan 10, 2021

@adidahiya Done

Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

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

looks good! I clicked around some components in the latest deploy preview and nothing seems to be broken. thanks @ejose19

@adidahiya adidahiya merged commit 8d272e4 into palantir:develop Jan 11, 2021
@adidahiya
Copy link
Contributor

@ejose19 heads up I'm cleaning up some of this code here #4475

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.

2 participants