mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-09-22 23:32:01 +00:00
fix: actually remove nodes in keyed_diff_middle
This commit is contained in:
parent
4954079212
commit
35a3eaabdf
1 changed files with 9 additions and 0 deletions
|
@ -813,6 +813,15 @@ impl<'b> DiffState<'b> {
|
|||
return;
|
||||
}
|
||||
|
||||
// remove any old children that are not shared
|
||||
// todo: make this an iterator
|
||||
for child in old {
|
||||
let key = child.key().unwrap();
|
||||
if !shared_keys.contains(&key) {
|
||||
self.remove_nodes([child], true);
|
||||
}
|
||||
}
|
||||
|
||||
// 4. Compute the LIS of this list
|
||||
let mut lis_sequence = Vec::default();
|
||||
lis_sequence.reserve(new_index_to_old_index.len());
|
||||
|
|
Loading…
Reference in a new issue