Skip to content
This repository was archived by the owner on Jul 1, 2022. It is now read-only.

Commit 357fd48

Browse files
committed
feat: listen kebab-cased event names
1 parent b9578ee commit 357fd48

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Calendar.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ export default {
182182
},
183183
addEventListeners() {
184184
for (const eventName of Object.keys(this.$listeners)) {
185-
this.calendarInstance.on(eventName, (...args) => this.$emit(eventName, ...args));
185+
const calendarEventName = eventName.replace(/-([a-z])/g, g => g[1].toUpperCase());
186+
this.calendarInstance.on(calendarEventName, (...args) => this.$emit(eventName, ...args));
186187
}
187188
},
188189
reflectSchedules() {

0 commit comments

Comments
 (0)