Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismccord committed Aug 8, 2023
1 parent fb11173 commit ca0628f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/js/phoenix_live_view/dom_patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ export default class DOMPatch {
})
if(reset !== undefined){
DOM.all(container, `[${PHX_STREAM_REF}="${ref}"]`, child => {
this.removeStreamChildElement(child)
if(!inserts[child.id]){
this.removeStreamChildElement(child)
}
})
}
deleteIds.forEach(id => {
Expand Down
1 change: 1 addition & 0 deletions assets/js/phoenix_live_view/rendered.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export default class Rendered {

if(stream !== undefined && (rendered[DYNAMICS].length > 0 || deleteIds.length > 0 || reset)){
delete rendered[STREAM]
rendered[DYNAMICS] = []
output.streams.add(stream)
}
}
Expand Down

0 comments on commit ca0628f

Please sign in to comment.