mirror of
https://github.com/leptos-rs/leptos.git
synced 2026-07-16 15:18:42 -04:00
fix: notify when structure changes during keyed patch (closes #4806)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user