fix: notify when structure changes during keyed patch (closes #4806)

This commit is contained in:
Greg Johnston
2026-06-20 20:56:59 -04:00
parent b2d0d8fad1
commit 656219b75f

View File

@@ -791,7 +791,7 @@ impl ToTokens for PatchModel {
}
} else if let Some(closure) = keyed {
quote! {
#library_path::PatchFieldKeyed::patch_field_keyed(
let structure_changed = #library_path::PatchFieldKeyed::patch_field_keyed(
&mut self.#locator,
new.#locator,
notify,
@@ -812,6 +812,9 @@ impl ToTokens for PatchModel {
Some(path)
}
);
if structure_changed {
notify(&new_path);
}
new_path.replace_last(#idx + 1);
}
} else {