function ExpandedItem() {
const [isExpanded, setIsExpanded] = useState(false);
return (
<Pressable
onPress={() => setIsExpanded((curr) => !curr)}
style={{
height: isExpanded ? 200 : 100,
backgroundColor: 'blue',
}}
></Pressable>
);
}
function BugLegendListTest() {
return (
<>
<FlatList
data={[1, 2, 3]}
horizontal
contentContainerStyle={{
gap: 16,
alignItems: 'flex-end',
}}
keyExtractor={(item) => String(item)}
renderItem={(item) => (
<View className="w-32">
<Text>{item.item}</Text>
<ExpandedItem />
</View>
)}
/>
<View className="mt-5"></View>
<LegendList
data={[1, 2, 3]}
horizontal
contentContainerStyle={{
gap: 16,
alignItems: 'flex-end',
}}
keyExtractor={(item) => String(item)}
renderItem={(item) => (
<View className="w-32">
<Text>{item.item}</Text>
<ExpandedItem />
</View>
)}
/>
</>
);
}
I created this simple example to show the issue
This is how it looks if the items are not expanded.

And this is how it looks when the item is expanded on both FlatList and LegendList

The FlatList expand and show the full item, while LegendList cut the item, since the view only shows the original size still, and the rest remain out of view.
Tested with version 3.3.7
I created this simple example to show the issue
This is how it looks if the items are not expanded.

And this is how it looks when the item is expanded on both FlatList and LegendList

The FlatList expand and show the full item, while LegendList cut the item, since the view only shows the original size still, and the rest remain out of view.
Tested with version
3.3.7