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

Version 2.13.x error with floatingLabel #2831

Closed
minhdang-idev opened this issue Jul 30, 2019 · 7 comments · May be fixed by actionhero/actionhero-react-native-example#33
Closed

Version 2.13.x error with floatingLabel #2831

minhdang-idev opened this issue Jul 30, 2019 · 7 comments · May be fixed by actionhero/actionhero-react-native-example#33

Comments

@minhdang-idev
Copy link

minhdang-idev commented Jul 30, 2019

Hi!

Issue Description

When using input with floatingLabel attribute + error validation, I suddenly got problem after I upgrade to version 2.13.x.

Expo 33 (or 34), Native Base 2.13.x

Expected behaviour

As example on native base doc https://docs.nativebase.io/Components.html#error-textbox-headref

Actual behaviour

Click on the input to type text, after typing, blur out of the input, app not responding.

Steps to reproduce

Check my snack right here https://snack.expo.io/@yanghuyming/a7a874
Don't wait for snack to render the code. It cannot render :) There is an error with the code that I just copied from Native base doc. That's why I open this.

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

Android (iOS not tested)

Note:

Roll back to native base version 2.12, it works normally.

Thanks.

@sankhadeeproy007
Copy link
Contributor

@minhdang-idev Can you please share a screenshot of the error you're getting?

@tosbaha
Copy link

tosbaha commented Jul 30, 2019

It is the same issue as #2786 Here is the minimum code for a crash

      <Content padder>
        <Form>
	<Item floatingLabel>
          <Icon name='mail' style={{ color: 'gray' }} />
	  <Label>Email</Label>
	  <Input />
	</Item>
	<Item floatingLabel last>
		 <Icon name='mail' style={{ color: 'gray' }} />
	  <Label>Password</Label>
	  <Input />
	</Item>
</Form>
      </Content>

@sankhadeeproy007
Copy link
Contributor

Hi @tosbaha, can you try cleaning your cache and checking again?

@minhdang-idev
Copy link
Author

@minhdang-idev Can you please share a screenshot of the error you're getting?

It's just not responding then 5 sec later the app crashes. I tried to run expo r -c many times but i does not work. One more thing I need to inform is: if you roll back to version 2.12.0 then it works normally.

@tosbaha
Copy link

tosbaha commented Jul 31, 2019

@sankhadeeproy007 Yes I tried multiple times. It is crashing. Please try the minimal code I posted and see the crash yourself. Last working version for me is 2.12.1

PlabanJr added a commit that referenced this issue Jul 31, 2019
@Sivli-Embir

This comment has been minimized.

@minhdang-idev
Copy link
Author

So... the crash was caused by the code in native-base:

for (let i = 0; i < this.props.children.length; i + 1) {

I don't know what to say :) Btw thank you for the fix.

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 a pull request may close this issue.

4 participants