Skip to content

Conditionally Render Icon in List Item #715

@ChristopherJohnson25

Description

@ChristopherJohnson25

Issue type

I'm submitting a ... (check one with "x")

  • bug report
  • feature request

Issue description

Current behavior:
I can't conditionally render icons in list items inside list.

Expected behavior:
Show icon on certain list items, and not on others.

		<List
							style={styles.list}
							data={loops}
							renderItem={({ item }) => (			
// if(true){}						
<ListItem
	onPress={() => this.goToLoop(item._snapshot.key)}
	title={item._snapshot.value.displayName}
	description={item._snapshot.key}
	accessory={() => this.renderAccessory(item._snapshot.key)}
	icon={() => 
		this.EditIcon(item._snapshot.key)
	}
/>

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions