Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit error when calendarAppEventDialog is edited #210

Open
wolfy007 opened this issue Nov 5, 2019 · 1 comment
Open

Edit error when calendarAppEventDialog is edited #210

wolfy007 opened this issue Nov 5, 2019 · 1 comment

Comments

@wolfy007
Copy link

wolfy007 commented Nov 5, 2019

Hi again! :)

I have an issue, when i am trying to add new inputs to the Event. I am adding the template calendarAppEventDialog to the ds-calendar-app and inside the dialog.

<template slot="calendarAppEventDialog" slot-scope="{$scopedSlots, $listeners, calendar, eventFinish}"> <ds-event-dialog ref="eventDialog" v-bind="{$scopedSlots}" v-on="$listeners" :calendar="calendar" @saved="eventFinish" @actioned="eventFinish" ></ds-event-dialog> </template>

But if I want to edit an existing event, it throws an error with an edit function:

`Error in event handler for "edit": "TypeError: Cannot read property 'edit' of undefined"

found in

---> DsCalendarEventTime
DsDayTimes
DsDaysView
DsCalendar
DsGestures
VContent
DsCalendarApp
VApp
App> at src/App.vue
Root`

Did I miss something?
P.S.:
Create is working perfectly with passed functions.

@wolfy007
Copy link
Author

wolfy007 commented Nov 5, 2019

To my EventPopover I passed :edit="editEvent" function which i have written in the App.vue.
In my EventPopover component I modified @click="edit" part to @click="edit(calendarEvent)" which is the prop and in the App.vue editEvent got the ev parameter and it looks like this:
let calendarEvent = ev;
let eventDialog = this.$refs.eventDialog;
eventDialog.edit(calendarEvent);

Is this a good method or is there an easier/better solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant