diff --git a/src/components/items_list.rs b/src/components/items_list.rs index c279b3b..557373a 100644 --- a/src/components/items_list.rs +++ b/src/components/items_list.rs @@ -112,86 +112,99 @@ pub fn ItemsList( }); }; + // List of properties to display as rows + let properties = vec!["Name", "Description", "Tags", "Actions"]; + view! {
{ "Name" } | -{ "Description" } | -{ "Tags" } | -{ "Actions" } | +{ "Property" } | + {move || items.get().iter().enumerate().map(|(index, _)| { + view! { +{ format!("Item {}", index + 1) } | + } + }).collect::
---|---|---|---|---|---|
-
{ property } |
+ {move || items.get().iter().enumerate().map(|(index, item)| {
+ view! {
+
+ {match property {
+ "Name" => view! {
+ |
- // Editable Description Field
-
- |
- // Tag Editor
-
- |
- // Actions
-
-
- |
+ view! {
+ |
+ }
+ }).collect::