-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Closed
Labels
BugComponent: FlatListNeeds: Issue TemplateThis issue does not make use of the Issue Template, and may be missing necessary information.This issue does not make use of the Issue Template, and may be missing necessary information.Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.Resolution: For Stack OverflowA question for Stack Overflow. Applying this label will cause issue to be closed.A question for Stack Overflow. Applying this label will cause issue to be closed.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Unable to get position of render items on Flatlist
I am trying to get an item's position in flatlist but it always returns "0".sample code are attached bellow.
Here is sample code :
<FlatList
data={["test1","test2","test2"]}
renderItem={({item,index}) => {
return(
<View
onLayout={(event) => {
let {x, y, width, height} = event.nativeEvent.layout;
}}
>
<Text>{item}</Text>
</View>
)
}}
/>
Can you please help me to get out from this stuff.
Metadata
Metadata
Assignees
Labels
BugComponent: FlatListNeeds: Issue TemplateThis issue does not make use of the Issue Template, and may be missing necessary information.This issue does not make use of the Issue Template, and may be missing necessary information.Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.Resolution: For Stack OverflowA question for Stack Overflow. Applying this label will cause issue to be closed.A question for Stack Overflow. Applying this label will cause issue to be closed.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.