Skip to content

Commit 4403692

Browse files
committed
Add selected layout when emitting event breakpoint-changed + fix minor typo
1 parent 4f4c090 commit 4403692

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,10 +647,11 @@ Working example [here](https://jbaysolutions.github.io/vue-grid-layout/examples/
647647
/**
648648
*
649649
* @param newBreakpoint the breakpoint name
650+
* @param newLayout the chosen layout for the breakpoint
650651
*
651652
*/
652-
breakpointChangedEvent: function(newBreakpoint){
653-
console.log("BREAKPOINT CHANGED B=" + newBreakpoint);
653+
breakpointChangedEvent: function(newBreakpoint, newLayout){
654+
console.log("BREAKPOINT CHANGED breakpoint=", newBreakpoint, ", layout: ", newLayout );
654655
},
655656
```
656657

src/components/GridLayout.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,7 @@
413413
this.layouts[newBreakpoint] = layout;
414414
415415
if (this.lastBreakpoint !== newBreakpoint) {
416-
this.$emit('update:')
417-
this.$emit('breakpoint-changed', newBreakpoint)
416+
this.$emit('breakpoint-changed', newBreakpoint, layout);
418417
}
419418
420419
// new prop sync

0 commit comments

Comments
 (0)