Skip to content

Conversation

@Duell10111
Copy link
Contributor

Motivation

If the tooltip got rendered in an FlatList an Tooltip render error could occur when running in an simulator with hermes.

Invariant Violation: [9217,"RCTView",11,{"position":"absolute","top":"<>","backgroundColor":0,"overflow":"visible"}] is not usable as a native method argument

Setting the default values fixed this.
Also described here already from another user:
#2237 (comment)

Fixes maybe this one #3085

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tested with locally adapt in the source code on Expo sample app

  • Jest Unit Test
  • Checked with example app

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation using yarn docs-build-api
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional context

@arpitBhalla
Copy link
Member

Can you do yarn install again

@Duell10111
Copy link
Contributor Author

yarn install worked locally on my pc 😅

@Duell10111
Copy link
Contributor Author

Duell10111 commented Jun 10, 2022

Seems like the Lockfile must be updated which is forbidden in the CI job. 😅

image

Should I update the lockfile in this PR?

@arpitBhalla
Copy link
Member

Yes

@Duell10111
Copy link
Contributor Author

Updated yarn.lock 😉

@codecov
Copy link

codecov bot commented Jun 10, 2022

Codecov Report

Merging #3550 (0c839c0) into next (7a811f9) will decrease coverage by 0.17%.
The diff coverage is 0.00%.

❗ Current head 0c839c0 differs from pull request most recent head 9eadcac. Consider uploading reports for the commit 9eadcac to get more accurate results

@@            Coverage Diff             @@
##             next    #3550      +/-   ##
==========================================
- Coverage   79.24%   79.07%   -0.18%     
==========================================
  Files          87       87              
  Lines        1807     1811       +4     
  Branches      792      813      +21     
==========================================
  Hits         1432     1432              
- Misses        369      373       +4     
  Partials        6        6              
Impacted Files Coverage Δ
packages/base/src/Tooltip/Tooltip.tsx 82.85% <0.00%> (-5.03%) ⬇️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@arpitBhalla arpitBhalla changed the title fix(Tooltip): fix bug in Tooltip.tsx with hermes in simulators fix(Tooltip): add default value in measure component Jun 11, 2022
@arpitBhalla arpitBhalla merged commit dd72676 into react-native-elements:next Jun 11, 2022
@arpitBhalla
Copy link
Member

Thanks for the contribution 🎉

@N6894135
Copy link

N6894135 commented Jul 8, 2022

Fix it

@arpitBhalla arpitBhalla linked an issue Jul 19, 2022 that may be closed by this pull request
@skondrashov
Copy link

I'm waiting for this to be released so that I can use react-native-safe-area-context ^4.0.0 in my project! Figured commenting might be more helpful than opening an issue since there's already a fix.

@vineethsagar
Copy link

This issue still exists. I am using 4.0.0-rc.7 version. Can someone please give some solution to this

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tooltip render error : "top":"<<NaN>>"

5 participants