mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 06:30:20 +00:00
set id before creating listener
This commit is contained in:
parent
d8f2174755
commit
bf548d4a0e
1 changed files with 1 additions and 1 deletions
|
@ -402,12 +402,12 @@ impl<'b> DiffState<'b> {
|
||||||
|
|
||||||
if old.listeners.len() == new.listeners.len() {
|
if old.listeners.len() == new.listeners.len() {
|
||||||
for (old_l, new_l) in old.listeners.iter().zip(new.listeners.iter()) {
|
for (old_l, new_l) in old.listeners.iter().zip(new.listeners.iter()) {
|
||||||
|
new_l.mounted_node.set(old_l.mounted_node.get());
|
||||||
if old_l.event != new_l.event {
|
if old_l.event != new_l.event {
|
||||||
self.mutations
|
self.mutations
|
||||||
.remove_event_listener(old_l.event, root.as_u64());
|
.remove_event_listener(old_l.event, root.as_u64());
|
||||||
self.mutations.new_event_listener(new_l, cur_scope_id);
|
self.mutations.new_event_listener(new_l, cur_scope_id);
|
||||||
}
|
}
|
||||||
new_l.mounted_node.set(old_l.mounted_node.get());
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for listener in old.listeners {
|
for listener in old.listeners {
|
||||||
|
|
Loading…
Reference in a new issue