Skip to content

Commit 4088ad6

Browse files
authored
only fetch new block when from inserter (#11)
1 parent a6460e4 commit 4088ad6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

assets/js/paver.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/paver.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,11 @@ window.Paver = function (data) {
453453
handle: '.paver__block-handle',
454454
direction: element.getAttribute('data-direction') || 'vertical',
455455
animation: 150,
456-
onAdd: (evt) => this.fetchBlock(evt),
456+
onAdd: (evt) => {
457+
if(evt.from === this.$refs.blocksInserter) {
458+
this.fetchBlock(evt)
459+
}
460+
},
457461
onEnd: (evt) => this.rebuildContent()
458462
})
459463
},

0 commit comments

Comments
 (0)