feat(labels): persist property labels on refresh.

This commit is contained in:
ryan 2025-01-27 16:48:28 +03:00
parent 49315128f8
commit c38f19d76c

View file

@ -74,10 +74,19 @@ pub fn ItemsList(
}
}
}
log!("Custom properties: {:?}", custom_props);
log!("Updating custom properties signal: {:?}", custom_props);
let custom_props_clone = custom_props.clone();
set_custom_properties.set(custom_props);
// Fetch labels for the custom properties
let property_ids = custom_props_clone;
let labels = fetch_property_labels(property_ids).await;
set_property_labels.update(|labels_map| {
for (key, value) in labels {
labels_map.insert(key, value);
}
});
log!("Items after loading: {:?}", items.get());
}
Err(err) => {