From 8c9b7d84caf45ce1674861a6c6976c3e88b33084 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 30 Jun 2025 16:26:25 +0300 Subject: [PATCH] feat(ItemsList): enhance table layout to matxh wireframe and improve item deletion UI --- src/components/ItemsList.tsx | 62 ++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/src/components/ItemsList.tsx b/src/components/ItemsList.tsx index 8d98601..4f2e75a 100644 --- a/src/components/ItemsList.tsx +++ b/src/components/ItemsList.tsx @@ -569,48 +569,42 @@ export function ItemsList({ url }: ItemsListProps) {

Items List

-
- - - - - {items.map((item, index) => ( - - ))} - - +
+
Property - {item.name || `Item ${index + 1}`} - -
{/* Name row */} - + {items.map((item, index) => ( - ))} {/* Description row */} - + {items.map((item, index) => ( - - {items.map((item, index) => ( -
NameName - updateItem(index, 'name', value)} - onSelect={(suggestion) => handleWikidataSelect(suggestion, item.id)} - fetchSuggestions={fetchWikidataSuggestions} - onFocus={() => setFocusedItemId(item.id)} - placeholder="Enter item name" - /> + +
+
+ updateItem(index, 'name', value)} + onSelect={(suggestion) => handleWikidataSelect(suggestion, item.id)} + fetchSuggestions={fetchWikidataSuggestions} + onFocus={() => setFocusedItemId(item.id)} + placeholder="Enter item name" + /> +
+ +
DescriptionDescription + updateItem(index, 'description', value)} @@ -628,18 +622,18 @@ export function ItemsList({ url }: ItemsListProps) { const propertyLabel = propertyLabels[property] || property; return (
+ {propertyLabel} + updateItem(index, property, value)}