[ANGULAR] eventRecord in beforeDragMoveEnd doesn't have realEventId
Posted: Sun Jun 06, 2021 8:16 pm
by SHQK
I'm using "beforeDragMoveEnd" and "beforeDragResizeEnd" to update event,
When I using "beforeDragResizeEnd", I can easily get the Id of the event I am resizing by using the realEventId property in the eventRecord,
But this property is not present in the eventRecord of the "beforeDragMoveEnd" event, so I can't get the Id of the event I'm moving and update it.
Attached file is the comparison when i use console.log of "beforeDragMoveEnd" and "beforeDragResizeEnd"
Re: [ANGULAR] eventRecord in beforeDragMoveEnd doesn't have realEventId
Hi sir,
There is no "record" parameter in "beforeDragMoveEnd", so how can I use it,
And I dont understand what field i need to add,
Please describe more detail,
Your answer is too general and not clear
Re: [ANGULAR] eventRecord in beforeDragMoveEnd doesn't have realEventId
Re: [ANGULAR] eventRecord in beforeDragMoveEnd doesn't have realEventId
Posted: Mon Jun 07, 2021 10:25 am
by SHQK
The first, please ignore about create my own event model and adding new field, we will discuss about it in another topic
The second, please reply me in this topic: viewtopic.php?f=54&t=17713
And about this topic:
Im download your filtering demo and apply example called "confirmation-dialogs"
So I run the console with "beforeDragResizeEnd" like this
It's too different you can see,
So how can I get value "5" of realEventId in "beforeDragMoveEnd" with your filtering demo
Please guide me
Re: [ANGULAR] eventRecord in beforeDragMoveEnd doesn't have realEventId
Posted: Mon Jun 07, 2021 11:53 am
by mats
First, avoid using 'data' of the eventRecord - pretend it's not there (it's a private member). Instead, define your own model and add your fields to it as per the docs I gave you above.
What is 'realEventId' in your app? If it's the id of your event, either rename this field in the backend to serve it to client side as 'id' or map your EventModel to use it as the id field (what you see when logging id is a generated id used until you save it in the server).
First, avoid using 'data' of the eventRecord - pretend it's not there (it's a private member). Instead, define your own model and add your fields to it as per the docs I gave you above.
What is 'realEventId' in your app? If it's the id of your event, either rename this field in the backend to serve it to client side as 'id' or map your EventModel to use it as the id field (what you see when logging id is a generated id used until you save it in the server).