sapp-common-package-test-final 1.5.7 → 1.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1496,6 +1496,15 @@ var SAPPCalendar = function SAPPCalendar(_ref) {
1496
1496
  useEffectAfterMounted(function () {
1497
1497
  onRefetchAPI(startDate.toDate(), endDate.toDate());
1498
1498
  }, [startDate, endDate]);
1499
+ React.useEffect(function () {
1500
+ setFilter(function (prev) {
1501
+ return _extends({}, prev, {
1502
+ courseId: courses ? courses.map(function (item) {
1503
+ return item.id;
1504
+ }) : []
1505
+ });
1506
+ });
1507
+ }, [courses]);
1499
1508
  return React__default.createElement("div", {
1500
1509
  className: styles['sapp-calendar']
1501
1510
  }, filter.isOpen && React__default.createElement(FilterCalendar, {