Nativebase: Floating Label error on production mode

Created on 27 Mar 2019  路  14Comments  路  Source: GeekyAnts/NativeBase

Issue Description

Hi,
I'm using floating label with a simple input. However when I set the value of the input, the floating label fails to float as it supposed to be, however if I focus on it the label will going up normally.

this is only happening on Production mode.

Screenshot_20190327_200623

node, npm, react-native, react and native-base version, expo version if used, xcode version

node : 11.11.0
expo : 2.13.0
native-base : 2.12.1
react-native: 0.57.1
react: 16.5.0

Expected behaviour

the same behaviour whether it is in production mode or debug mode

Steps to reproduce

here's the code : https://github.com/blankonn/floating-error

Is the bug present in both iOS and Android or in any one of them?

only test on android

Most helpful comment

I have the same issue when I get data from API request

All 14 comments

same error

Unfortunately, it didn't work...

While the issue that you mention is happened when the user is typing the input,

my issue is happened when I set the value of the input directly on start up of the screen

Sorry if I can't explain this better.. maybe you should check my provided repo and I will gladly provided required information if you need it. Thanks

I have mentioned the issue number along with the comment, which does not state issue

To me, this is happening when I load the value from asyncstorage.

for entry it is working fine but "In release mode only" it overlaps the label. It is a very old issue and keeps happening, and unfortunately, I saw many tickets closed with no solution.

I have the same issue when I get data from API request

Im having the same issue, I've tried several of the solutions posted related to this issue and still the same.

I have the same issue

I have the same issue

I have the same issue with Native-base 2.12.1

Same issue with 2.13.8, if i open a Label with value the placeholder is over the text.
Tested on Android Galaxy Tab (new device fully up to date)

Same issue with 2.13.8. It only happens in production mode and in real devices, even if you debug in real devices it doesn't happen.

Hey there this issue is still happening.

But you can force to render after a while:

const [timestamp, setTimestamp] = useState(Date.now())  

useEffect(()=>{
    setTimeout(()=>{
      setTimestamp(Date.now())
    },300);
},[]);

It is not the best/cleanest solution but it works.

bug is still exist.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

inv2004 picture inv2004  路  3Comments

eggybot picture eggybot  路  3Comments

kitsune7 picture kitsune7  路  3Comments

natashache picture natashache  路  3Comments

bsiddiqui picture bsiddiqui  路  3Comments