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

what do I do to update calendar view after updating or adding event using vue #10

Open
capricorn05 opened this issue Jul 15, 2021 · 4 comments

Comments

@capricorn05
Copy link

what do I do to update calendar view after updating or adding event using vue.
Nothing I have tried works and example online does not work. do you have working example
thanks

@massimiliano-cannata
Copy link

I have the same issue, using view.... it looks like the data-source is not reactive to display new events? is it? how to force a data source reload? I see a setDataSource() exists... could it be a computed?
sorry for my newby silly questions..
Maxi

@massimiliano-cannata
Copy link

Maybe I've found a solution.... (temporary hack)...

  1. put the key in your element..

<Calendar :key="calendarKey" ....../>

  1. In your data set this variable
    calendarKey: 0

  2. after adding the new event and modified your dataSource variable update the calandarKey.

this.calendarKey += 1

Changing the key force element reload.....

@VK-Wolland
Copy link

VK-Wolland commented Feb 23, 2022

Settings dataSource to empty array and then settings in to correct value did the trick for me.

this.dataSource = [];
this.$nextTick(() => { this.dataSource = this.events.map(e => new ViewModel(e)); });

@Galch24
Copy link

Galch24 commented Sep 2, 2022

I have the same issue. I tried solution from @VK-Wolland and another solution from @massimiliano-cannata . And it doesn't work for me. data-source is not reactive , but I see that render function worked. Event renderEnd do his job.

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

4 participants