List Item is not rendering properly when I am trying to render them dynamically
See original GitHub issueDynamic List doesn’t look pleasant.
Here is my code:
<Content>
<Card>
<List
dataArray={this.props.employees}
renderRow={item => (
// <ListItem icon>
<ListItem onPress={() => this.editEmp(item)}>
<CardItem>
<Body>
<Text>
{" "}
{item.name}
</Text>
</Body>
</CardItem>
</ListItem>
)}
/>
</Card>
</Content>
Also, item looks something like this: I am using Nokia 5 with android Nougat. When rendered, It shows this: I think I can see a pattern of rendering lists items in an incorrect way, grouping of an item, then two items together most of the times, which looks unpleasant to eyes.
Please help regarding this issue.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
React Native Dynamically created components not rendering ...
I'm trying to create a list by dynamically adding the list items to an array in the state and then using the map...
Read more >Rendering A List With React - Vegibit
To render a list dynamically in React, we start by adding a property to the state object. We can populate that property with...
Read more >Lightning component not rendering dynamically created ...
I built a prototype, and I am trying to get it to render the created lightning components correctly. Here is the code for...
Read more >Render React Cards and Images Dynamically - In Plain English
Rendering Images/cards/elements based on an API response is something common in React. Adding React components in a row responsively is ...
Read more >React key attribute: best practices for performant lists
We'll have an Item component, that renders the country's info: ... All those bugs and performance implications only happen in “dynamic” ...
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 FreeTop 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
Top GitHub Comments
@AnubhavUjjawal we are deprecating List. Use FlatList instead. This will be documented.
https://nativebase.io/docs/v0.3.0/components#list does not yet mention that List will be (or is) deprecated. fyi.