Skip to content
This repository was archived by the owner on Aug 3, 2019. It is now read-only.

Commit 21e7eb6

Browse files
feat: added start and end events to give parent the ability to work with OS instance e.g. add/remove extensions to it
1 parent 2839dd6 commit 21e7eb6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/OverlayScrollbars.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ export default {
1717
},
1818

1919
mounted() {
20-
if (!this.instance)
21-
this.instance = OverlayScrollbars(this.$el, this.options);
20+
this.instance = OverlayScrollbars(this.$el, this.options);
21+
this.$emit('start', this.instance);
2222
},
2323

2424
beforeDestroy() {
25+
this.$emit('end', this.instance);
2526
this.instance.destroy();
2627
this.instance = null;
2728
},

0 commit comments

Comments
 (0)