Drawer with Item and Icon locks render
See original GitHub issueI have gone through these following points
- Check latest documentation: https://docs.nativebase.io/
- Check for existing open/closed issues for a possible duplicate before creating a new issue: https://github.com/GeekyAnts/NativeBase/issues
- Use the latest NativeBase release: https://github.com/GeekyAnts/NativeBase/releases
- Check examples from NativeBase KitchenSink https://github.com/GeekyAnts/NativeBase-KitchenSink
- For discussion purpose make use of NativeBase Slack: http://slack.nativebase.io/
- For queries related to theme, check Theme Variables from Docs and live NativeBase Theme Editor http://nativebase.io/customizer/
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:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top 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
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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This issue has been taken care of in our latest release v2.12.5. Please try it out!
Thank you for reporting!
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.