Skip to content

Commit

Permalink
only fetch new block when from inserter (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyvr authored Jan 23, 2025
1 parent a6460e4 commit 4088ad6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/js/paver.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion resources/js/paver.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,11 @@ window.Paver = function (data) {
handle: '.paver__block-handle',
direction: element.getAttribute('data-direction') || 'vertical',
animation: 150,
onAdd: (evt) => this.fetchBlock(evt),
onAdd: (evt) => {
if(evt.from === this.$refs.blocksInserter) {
this.fetchBlock(evt)
}
},
onEnd: (evt) => this.rebuildContent()
})
},
Expand Down

0 comments on commit 4088ad6

Please sign in to comment.