From 3ccb075bfe359e2868408bbb6cc6b0e82114ec00 Mon Sep 17 00:00:00 2001 From: webspresso Date: Sat, 10 Nov 2018 02:38:27 +0200 Subject: [PATCH 1/2] add resourceId param to slotPropGetter hook --- src/Calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Calendar.js b/src/Calendar.js index c1264cc6b..888c58be6 100644 --- a/src/Calendar.js +++ b/src/Calendar.js @@ -481,7 +481,7 @@ class Calendar extends React.Component { * position may break the calendar in unexpected ways. * * ```js - * (date: Date) => { className?: string, style?: Object } + * (date: Date, resourceId: (number|string)) => { className?: string, style?: Object } * ``` */ slotPropGetter: PropTypes.func, From 10645a1a8cdbf9fd69e4c4563403075e407241ac Mon Sep 17 00:00:00 2001 From: webspresso Date: Sat, 10 Nov 2018 02:41:03 +0200 Subject: [PATCH 2/2] pass resourceId param to slotPropGetter hook --- src/TimeSlotGroup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TimeSlotGroup.js b/src/TimeSlotGroup.js index bdc3003c7..ab964b57a 100644 --- a/src/TimeSlotGroup.js +++ b/src/TimeSlotGroup.js @@ -25,7 +25,7 @@ export default class TimeSlotGroup extends Component { return (
{group.map((value, idx) => { - const slotProps = getters ? getters.slotProp(value) : {} + const slotProps = getters ? getters.slotProp(value, resource) : {} return (