I creating a POS UI Extension, in which I am searching products using the search component and product-search API. I am trying to show that as a List component on the Screen. However, after doing a search data is showing in console.log but the error coming for the List component “Invalid prop ‘data’ in _List Component”. Please let me know if anyone has a perfect example of using the List component in POS UI Extension.
The error you’re experiencing is likely due to the format of the data you’re supplying to the List component. The data for the List component should be an array of objects and each object representing a row in the list.
Hi, I am facing the same problem. I cant display the List item even I put ListRow array as my data in List component.
I have found the way to use the List component. This is the example of my code.
<List
title=“Organization List”
data={data.map((item) => ({
id: item.id, // Replace with the actual id for each item
rightSide: { showChevron: true, label: item.label },
leftSide:{label:item.label},
onPress: () => {
// Handle the onPress event for each item