feat(labels): persist property labels on refresh.
This commit is contained in:
parent
49315128f8
commit
c38f19d76c
1 changed files with 11 additions and 2 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue