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

Changing to an association with no events does not clear calendar #42

Closed
tieniber opened this issue Oct 28, 2016 · 1 comment
Closed

Comments

@tieniber
Copy link
Contributor

Per a discussion on MX forums:

The problem:
I am using the calendar widget with Xpath retrieve. In the dataview where I have the calendar widget, I have attributes that can be switched on and off via checkboxes to filter the events that appear in the calendar. The checkboxes have an onchange microflow that repopulates the association used to retrieve events for the calendar. When the set of checkboxes selected returns events, this all works fine, i.e. the user checks or unchecks attributes and the events refresh as they should with fewer or more events. However, when the set of events retrieved is empty, and the corresponding association is set to empty, the events that were displayed in the calendar widget are not removed. So the user sees events in the calendar widget when there should be no events. This only happens in the case where no events are retrieved because the set of conditions is too restrictive.

The suggested fix:
https://github.com/mendix/Calendar/blob/master/src/calendar/widget/calendar.js#L229 On line 229, if the length of the events list is 0 or null, the function returns and nothing changes. It should probably be wiping all events from the calendar in this case, with a line like this: this._clearCalendar();

Mike Kumpf implemented this suggested solution and says it's working.

JelteMX pushed a commit that referenced this issue Nov 8, 2016
@JelteMX
Copy link
Contributor

JelteMX commented Nov 8, 2016

Fixed in 5.1.1, updating in AppStore in 1-2 days

@JelteMX JelteMX closed this as completed Nov 8, 2016
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

2 participants