Skip to content

feat: fallback to original findDOMNode if using function component #145

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

Merged
merged 3 commits into from
Oct 11, 2019

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Oct 11, 2019

Add an additional try...catch... to check throw with function component. If can not get DOM node by ref will fallback to use findDOMNode(this) to get the workable DOM node.

@vercel
Copy link

vercel bot commented Oct 11, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/react-component/trigger/kb6opkid6
🌍 Preview: https://trigger-git-fallback.react-component.now.sh

@codecov
Copy link

codecov bot commented Oct 11, 2019

Codecov Report

Merging #145 into master will increase coverage by 0.14%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #145      +/-   ##
==========================================
+ Coverage   83.55%   83.69%   +0.14%     
==========================================
  Files           7        7              
  Lines         456      460       +4     
  Branches      121      122       +1     
==========================================
+ Hits          381      385       +4     
  Misses         75       75
Impacted Files Coverage Δ
src/index.tsx 79.73% <100%> (+0.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8c2ad74...6c4bca1. Read the comment docs.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Oct 11, 2019

This pull request introduces 1 alert when merging 3557eed into 8c2ad74 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@vercel vercel bot temporarily deployed to staging October 11, 2019 02:49 Inactive
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Oct 11, 2019

This pull request fixes 1 alert when merging 6c4bca1 into 8c2ad74 - view on LGTM.com

fixed alerts:

  • 1 for Useless conditional

@zombieJ zombieJ merged commit 30b3954 into master Oct 11, 2019
@delete-merged-branch delete-merged-branch bot deleted the fallback branch October 11, 2019 02:56
@stevensacks
Copy link

I'm curious how getTriggerDOMNode works. I can't find the actual function anywhere in the code...

@zombieJ
Copy link
Member Author

zombieJ commented Oct 17, 2019

getTriggerDOMNode is internal usage. Avoid this since it may refactor.

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.

3 participants