question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Drawer with Item and Icon locks render

See original GitHub issue

I have gone through these following points

Issue Description

I am trying to use a floatingLabel with an Icon in a Drawer and it locks up the rendering of all components. Using code below I get a white screen. If I remove Icon in the Drawer content it renders fine.

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

package.json has the following:

"dependencies": {
    "native-base": "^2.13.4",
    "react": "16.8.6",
    "react-native": "0.60.4"
  }

Expected behaviour

Everything should render properly

Actual behaviour

Screen is blank

Steps to reproduce

import React, {useRef} from 'react'
import { Drawer, Button, Text, Content, Form, Item, Label, Input, Icon } from 'native-base'

const App = () => {
  const drawerRef = useRef()
  const closeDrawer = () => {
    drawerRef.current._root.close()
  };
  const openDrawer = () => {
    drawerRef.current._root.open()
  };
  return (
      <Drawer
          ref={drawerRef}
          content={<Content style={{backgroundColor: '#FFF'}}>
            <Form>
              <Item floatingLabel>
                <Label>Username</Label>
                <Input />
                {/*<Icon active name='home' />*/}
              </Item>
            </Form>
          </Content>}
          onClose={() => closeDrawer()}
      >
        <Button
            onPress={() => openDrawer()}
            hasText
        ><Text>Click Me!</Text><Icon active name='home' /></Button>
      </Drawer>
  );
};

export default App

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

Both iOS and Android

Any other additional info which would help us debug the issue quicker.

When I force a pause in the debugger I see animation related code in the stacktraces. This issue started in 2.12.2 as the code works fine in 2.12.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
PlabanJrcommented, Aug 16, 2019

This issue has been taken care of in our latest release v2.12.5. Please try it out!

Thank you for reporting!

1reaction
wesley-hardingcommented, Aug 9, 2019

I’m seeing the same issue (with a very similar setup to above).

It seems to only be affecting Items with a Floating Label. Fixed, Inline, and Stacked work without issue. Floating label results in a white screen with no content rendering.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add icons in drawer navigation menu? #4379
How to add different icon to each button in drawer menu?
Read more >
Navigation drawer using text and icon
I want to add icon for each item of the navigation drawer. Currently, The navigation drawer just have a text. Summing up, I...
Read more >
DrawerNavigator reference
contentComponent - Component used to render the content of the drawer, for example, navigation items. Receives the navigation prop for the drawer.
Read more >
Drawer
a Vue 3 based component library for designers and developers.
Read more >
Drawer
Drawer. Display overlay area at any side of the screen ... drawer is opened focus is trapped inside and document.body scroll is locked...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found