| Category | +Items | +Actions | +
|---|---|---|
| + {editingName === cat.category ? ( + setNewName(e.target.value)} + onKeyDown={e => { + if (e.key === 'Enter') handleRename(cat.category); + if (e.key === 'Escape') cancelRename(); + }} + autoFocus + className="w-full px-2 py-1 border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 text-sm" + /> + ) : ( + cat.category + )} + | +{cat.item_count} | +
+
+ {editingName === cat.category ? (
+ <>
+
+
+ >
+ ) : (
+ <>
+
+
+ >
+ )}
+
+ |
+
| Location | +Items | +Actions | +
|---|---|---|
| + {editingName === loc.location ? ( + setNewName(e.target.value)} + onKeyDown={e => { + if (e.key === 'Enter') handleRename(loc.location); + if (e.key === 'Escape') cancelRename(); + }} + autoFocus + className="w-full px-2 py-1 border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 text-sm" + /> + ) : ( + loc.location + )} + | +{loc.item_count} | +
+
+ {editingName === loc.location ? (
+ <>
+
+
+ >
+ ) : (
+ <>
+
+
+ >
+ )}
+
+ |
+