From 0e1e1a084af984106e8b01fe51628ff1572df948 Mon Sep 17 00:00:00 2001 From: WebspressoCo <43375076+WebspressoCo@users.noreply.github.com> Date: Tue, 13 Nov 2018 15:36:58 +0200 Subject: [PATCH] feat: pass resourceId to slotPropGetter (#1101) * add resourceId param to slotPropGetter hook * pass resourceId param to slotPropGetter hook --- src/Calendar.js | 2 +- src/TimeSlotGroup.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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, 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 (