You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered: