You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
onLayout is providing incorrect values, resulting in my animated height value to be inaccurate.
^ Screenshot had a +10 bottom padding, if I remove it, the last line of text is cut in half for sure.
To Reproduce
Please look at code example. Download it and run it on iOS simulator. The react/native version does not matter.
Look at where the red box bottom is at, in relation to the bottom text. Now click on the bold title to close the panel and click on it to open it again.
Observe the screw up.
Observe the code in ./components/Panel.js especially setMaxHeight and setMinHeight which are the onLayout functions.
Expected Behavior
^ I expect to see this and not a shorten/cut off text.
The workaround is to either manually compensate for the borderWidth by adding that amount when expanding the panel, or remove borderWidth: 2 totally. Not good.
@CyberMew you can have borderWidth constant and use it to calculate the layout. I'm afraid that it won't be fixed, because it'll be breaking change for other apps that relies on current implementation.
🐛 Bug Report
onLayout is providing incorrect values, resulting in my animated height value to be inaccurate.
^ Screenshot had a +10 bottom padding, if I remove it, the last line of text is cut in half for sure.
To Reproduce
Please look at code example. Download it and run it on iOS simulator. The react/native version does not matter.
Look at where the red box bottom is at, in relation to the bottom text. Now click on the bold title to close the panel and click on it to open it again.
Observe the screw up.
Observe the code in ./components/Panel.js especially
setMaxHeight
andsetMinHeight
which are the onLayout functions.Expected Behavior
^ I expect to see this and not a shorten/cut off text.
Code Example
https://github.com/CyberMew/rnbug
Environment
React Native Environment Info:
System:
OS: macOS 10.14.3
CPU: (12) x64 Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz
Memory: 9.64 GB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.1 - /usr/local/bin/node
npm: 6.4.1 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
IDEs:
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.1 => 0.59.1
npmGlobalPackages:
react-native-cli: 2.0.1
The text was updated successfully, but these errors were encountered: