+
+
Product
+
Category
+
{
+ setSelectedItems(data.selectedItems);
+ if (data.selectedItems[0] === selectedItems[0]) {
+ btnClicked();
+ }
+ products.forEach(p => {
+ if (p.Id === data.selectedItems[0]) {
+ setSelectedProduct(p); // Assuming unique Ids
+ }
+ });
+ }}
+ >
+ {products.map(({ Id, Name, Category }) => (
+
+ {Name}
+ {Category}
+
+ ))}
+
+
+
+
+ {categories.map(c => )}
+
+
+